* [PATCH v3] Bluetooth: RFCOMM: hold the listener across child teardown
[not found] <20261115191908.3646-enderaoelyther@gmail.com>
@ 2026-11-20 12:18 ` Hang Nan
2026-11-20 13:28 ` [v3] " bluez.test.bot
0 siblings, 1 reply; 2+ messages in thread
From: Hang Nan @ 2026-11-20 12:18 UTC (permalink / raw)
To: linux-bluetooth
Cc: marcel, luiz.dentz, luiz.von.dentz, pav, zzzccc427,
enderaoelyther
---
net/bluetooth/rfcomm/sock.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/net/bluetooth/rfcomm/sock.c b/net/bluetooth/rfcomm/sock.c
index 3fb8b5474948..94a495e86057 100644
--- a/net/bluetooth/rfcomm/sock.c
+++ b/net/bluetooth/rfcomm/sock.c
@@ -66,6 +66,7 @@ static void rfcomm_sk_state_change(struct rfcomm_dlc *d, int err)
__must_hold(&d->lock)
{
struct sock *sk = d->owner, *parent;
+ bool held = false;
if (!sk)
return;
@@ -83,6 +84,12 @@ static void rfcomm_sk_state_change(struct rfcomm_dlc *d, int err)
if (parent) {
if (d->state == BT_CLOSED) {
sock_set_flag(sk, SOCK_ZAPPED);
+ /* close() may already have dropped its reference and the
+ * queue holds none, so keep the listener alive across the
+ * unlink and the notification.
+ */
+ sock_hold(parent);
+ held = true;
bt_accept_unlink(sk);
}
parent->sk_data_ready(parent);
@@ -100,6 +107,12 @@ static void rfcomm_sk_state_change(struct rfcomm_dlc *d, int err)
* rfcomm_sock_destruct() will dead lock. */
rfcomm_dlc_unlock(d);
rfcomm_sock_kill(sk);
+ /* Drop the listener reference with neither the child's socket
+ * lock nor its DLC lock held: this put can be the final one and
+ * rfcomm_sock_destruct() takes the listener's own DLC mutex.
+ */
+ if (held)
+ sock_put(parent);
rfcomm_dlc_lock(d);
}
}
--
2.47.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* RE: [v3] Bluetooth: RFCOMM: hold the listener across child teardown
2026-11-20 12:18 ` [PATCH v3] Bluetooth: RFCOMM: hold the listener across child teardown Hang Nan
@ 2026-11-20 13:28 ` bluez.test.bot
0 siblings, 0 replies; 2+ messages in thread
From: bluez.test.bot @ 2026-11-20 13:28 UTC (permalink / raw)
To: linux-bluetooth, 2122295973
[-- Attachment #1: Type: text/plain, Size: 2019 bytes --]
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/series/1217309/
---Test result---
Test Summary:
CheckPatch FAIL 0.49 seconds
VerifyFixes PASS 0.07 seconds
VerifySignedoff PASS 0.07 seconds
GitLint FAIL 0.20 seconds
SubjectPrefix PASS 0.06 seconds
BuildKernel PASS 23.27 seconds
CheckAllWarning PASS 27.65 seconds
CheckSparse PASS 29.94 seconds
BuildKernel32 PASS 24.18 seconds
CheckKernelLLVM PASS 24.74 seconds
TestRunnerSetup PASS 559.27 seconds
TestRunner_rfcomm-tester PASS 6.64 seconds
IncrementalBuild PASS 23.02 seconds
Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script
Output:
[v3] Bluetooth: RFCOMM: hold the listener across child teardown
WARNING: Missing commit description - Add an appropriate one
ERROR: Missing Signed-off-by: line(s)
total: 1 errors, 1 warnings, 0 checks, 31 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.
/home/runner/work/bluetooth-next/bluetooth-next/src/patch/15005421.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.
##############################
Test: GitLint - FAIL
Desc: Run gitlint
Output:
[v3] Bluetooth: RFCOMM: hold the listener across child teardown
1: CC1 Body does not contain a 'Signed-off-by' line
https://github.com/bluez/bluetooth-next/pull/1168
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-20 13:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20261115191908.3646-enderaoelyther@gmail.com>
2026-11-20 12:18 ` [PATCH v3] Bluetooth: RFCOMM: hold the listener across child teardown Hang Nan
2026-11-20 13:28 ` [v3] " bluez.test.bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox