[PW_SID:1077317] [v3,1/1] Bluetooth: serialize accept_q access#3448
[PW_SID:1077317] [v3,1/1] Bluetooth: serialize accept_q access#3448BluezTestBot wants to merge 2 commits intoworkflowfrom
Conversation
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>
bt_sock_poll() walks the accept queue without synchronization, while child teardown can unlink the same socket and drop its last reference. Protect accept_q with a dedicated lock for queue updates and polling. Also rework bt_accept_dequeue() to take temporary child references under the queue lock before dropping it and locking the child socket. Fixes: 1da177e ("Linux-2.6.12-rc2") Reported-by: Yifan Wu <yifanwucs@gmail.com> Reported-by: Juefei Pu <tomapufckgml@gmail.com> Co-developed-by: Yuan Tan <yuantan098@gmail.com> Signed-off-by: Yuan Tan <yuantan098@gmail.com> Suggested-by: Xin Liu <bird@lzu.edu.cn> Tested-by: Ren Wei <enjou1224z@gmail.com> Signed-off-by: Jiexun Wang <wangjiexun2025@gmail.com> Signed-off-by: Ren Wei <n05ec@lzu.edu.cn>
|
CheckPatch |
|
GitLint |
|
SubjectPrefix |
|
BuildKernel |
|
CheckAllWarning |
|
CheckSparse |
|
BuildKernel32 |
|
TestRunnerSetup |
|
TestRunner_l2cap-tester |
|
TestRunner_iso-tester |
|
TestRunner_bnep-tester |
|
TestRunner_mgmt-tester |
|
TestRunner_rfcomm-tester |
|
TestRunner_sco-tester |
|
TestRunner_ioctl-tester |
|
TestRunner_mesh-tester |
|
TestRunner_smp-tester |
|
TestRunner_userchan-tester |
|
IncrementalBuild |
f07ea67 to
9a108c6
Compare
From: Jiexun Wang wangjiexun2025@gmail.com
bt_sock_poll() walks the accept queue without synchronization, while
child teardown can unlink the same socket and drop its last reference.
Protect accept_q with a dedicated lock for queue updates and polling.
Also rework bt_accept_dequeue() to take temporary child references under
the queue lock before dropping it and locking the child socket.
Fixes: 1da177e ("Linux-2.6.12-rc2")
Reported-by: Yifan Wu yifanwucs@gmail.com
Reported-by: Juefei Pu tomapufckgml@gmail.com
Co-developed-by: Yuan Tan yuantan098@gmail.com
Signed-off-by: Yuan Tan yuantan098@gmail.com
Suggested-by: Xin Liu bird@lzu.edu.cn
Tested-by: Ren Wei enjou1224z@gmail.com
Signed-off-by: Jiexun Wang wangjiexun2025@gmail.com
Signed-off-by: Ren Wei n05ec@lzu.edu.cn
Changes in v3:
critical sections to serialize sk_ack_backlog updates with accept_q
operations
Changes in v2:
include/net/bluetooth/bluetooth.h | 1 +
net/bluetooth/af_bluetooth.c | 87 +++++++++++++++++++++++--------
2 files changed, 66 insertions(+), 22 deletions(-)