Skip to content

[PW_SID:1091961] Bluetooth: hci_uart: serialize close flush with write_work#158

Open
BluezTestBot wants to merge 6 commits into
workflowfrom
1091961
Open

[PW_SID:1091961] Bluetooth: hci_uart: serialize close flush with write_work#158
BluezTestBot wants to merge 6 commits into
workflowfrom
1091961

Conversation

@BluezTestBot
Copy link
Copy Markdown

hci_uart_close() calls hci_uart_flush(), and flush may free hu->tx_skb.
At the same time, hci_uart_write_work() can still be running and access
the same skb (for example through skb_pull()), which leads to a
use-after-free.

Fix this by canceling write_work before calling hci_uart_flush(), so the
tx_skb lifetime is fully serialized against the TX worker.

Reported-by: syzbot+da2717d5c64bf7975268@syzkaller.appspotmail.com
Link: https://syzkaller.appspot.com/bug?extid=da2717d5c64bf7975268
Cc: stable@vger.kernel.org
Signed-off-by: wuyankun wuyankun@uniontech.com

drivers/bluetooth/hci_ldisc.c | 3 +++
1 file changed, 3 insertions(+)

tedd-an and others added 6 commits May 6, 2026 20:37
This patch adds workflow files for ci:

[sync.yml]
 - The workflow file for scheduled work
 - Sync the repo with upstream repo and rebase the workflow branch
 - Review the patches in the patchwork and creates the PR if needed

[ci.yml]
 - The workflow file for CI tasks
 - Run CI tests when PR is created

Signed-off-by: Tedd Ho-Jeong An <tedd.an@intel.com>
This replaces the bzcafe action with bluez/action-ci so we can maintain
everything in the github bluez organization

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This attempts to sync every 5 minutes instead of 30.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
bluez/action-ci uses master as default branch for workflow which is
incorrect for kernel

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
The CI action now creates individual GitHub Check Runs per test, which
requires 'checks: write' permission on the GITHUB_TOKEN. Also make the
pull_request trigger types explicit to include 'reopened', allowing CI
to be retriggered by closing and reopening a PR.
hci_uart_close() calls hci_uart_flush(), and flush may free hu->tx_skb.
At the same time, hci_uart_write_work() can still be running and access
the same skb (for example through skb_pull()), which leads to a
use-after-free.

Fix this by canceling write_work before calling hci_uart_flush(), so the
tx_skb lifetime is fully serialized against the TX worker.

Reported-by: syzbot+da2717d5c64bf7975268@syzkaller.appspotmail.com
Link: https://syzkaller.appspot.com/bug?extid=da2717d5c64bf7975268
Cc: stable@vger.kernel.org
Signed-off-by: wuyankun <wuyankun@uniontech.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 9, 2026

CheckPatch
Desc: Run checkpatch.pl script
Duration: 0.92 seconds
Result: FAIL
Output:

Bluetooth: hci_uart: serialize close flush with write_work
WARNING: Reported-by: should be immediately followed by Closes: with a URL to the report
#97: 
Reported-by: syzbot+da2717d5c64bf7975268@syzkaller.appspotmail.com
Link: https://syzkaller.appspot.com/bug?extid=da2717d5c64bf7975268

WARNING: The commit message has 'stable@', perhaps it also needs a 'Fixes:' tag?

total: 0 errors, 2 warnings, 11 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

/github/workspace/src/patch/14562736.patch has style problems, please review.

NOTE: Ignored message types: UNKNOWN_COMMIT_ID

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.


@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 9, 2026

GitLint
Desc: Run gitlint
Duration: 0.23 seconds
Result: PASS

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 9, 2026

SubjectPrefix
Desc: Check subject contains "Bluetooth" prefix
Duration: 0.07 seconds
Result: PASS

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 9, 2026

BuildKernel
Desc: Build Kernel for Bluetooth
Duration: 26.57 seconds
Result: PASS

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 9, 2026

CheckAllWarning
Desc: Run linux kernel with all warning enabled
Duration: 29.35 seconds
Result: PASS

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 9, 2026

CheckSparse
Desc: Run sparse tool with linux kernel
Duration: 27.96 seconds
Result: PASS

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 9, 2026

BuildKernel32
Desc: Build 32bit Kernel for Bluetooth
Duration: 25.93 seconds
Result: PASS

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 9, 2026

TestRunnerSetup
Desc: Setup kernel and bluez for test-runner
Duration: 570.70 seconds
Result: PASS

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 9, 2026

IncrementalBuild
Desc: Incremental build with the patches in the series
Duration: 25.68 seconds
Result: PASS

@github-actions github-actions Bot force-pushed the workflow branch 2 times, most recently from 5c3256e to 75a1a12 Compare May 11, 2026 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants