2024-04-04 10:52:08

by Archie Pusaka

[permalink] [raw]
Subject: [PATCH] Bluetooth: l2cap: Don't double set the HCI_CONN_MGMT_CONNECTED bit

From: Archie Pusaka <[email protected]>

The bit is set and tested inside mgmt_device_connected(), therefore we
must not set it just outside the function.

Fixes: eeda1bf97bb5 ("Bluetooth: hci_event: Fix not indicating new connection for BIG Sync")
Signed-off-by: Archie Pusaka <[email protected]>
Reviewed-by: Manish Mandlik <[email protected]>

---

net/bluetooth/l2cap_core.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index cf3b8e9b7b3ba..b0970462a6899 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -4063,8 +4063,7 @@ static int l2cap_connect_req(struct l2cap_conn *conn,
return -EPROTO;

hci_dev_lock(hdev);
- if (hci_dev_test_flag(hdev, HCI_MGMT) &&
- !test_and_set_bit(HCI_CONN_MGMT_CONNECTED, &hcon->flags))
+ if (hci_dev_test_flag(hdev, HCI_MGMT))
mgmt_device_connected(hdev, hcon, NULL, 0);
hci_dev_unlock(hdev);

--
2.44.0.478.gd926399ef9-goog



2024-04-04 11:30:34

by bluez.test.bot

[permalink] [raw]
Subject: RE: Bluetooth: l2cap: Don't double set the HCI_CONN_MGMT_CONNECTED bit

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/project/bluetooth/list/?series=841371

---Test result---

Test Summary:
CheckPatch PASS 0.69 seconds
GitLint PASS 3.74 seconds
SubjectPrefix PASS 0.46 seconds
BuildKernel PASS 30.28 seconds
CheckAllWarning PASS 32.92 seconds
CheckSparse PASS 38.53 seconds
CheckSmatch FAIL 36.35 seconds
BuildKernel32 PASS 31.00 seconds
TestRunnerSetup PASS 524.59 seconds
TestRunner_l2cap-tester PASS 17.95 seconds
TestRunner_iso-tester FAIL 32.79 seconds
TestRunner_bnep-tester PASS 4.69 seconds
TestRunner_mgmt-tester PASS 110.26 seconds
TestRunner_rfcomm-tester PASS 7.36 seconds
TestRunner_sco-tester PASS 16.95 seconds
TestRunner_ioctl-tester PASS 7.69 seconds
TestRunner_mesh-tester PASS 5.80 seconds
TestRunner_smp-tester PASS 6.77 seconds
TestRunner_userchan-tester PASS 4.89 seconds
IncrementalBuild PASS 28.13 seconds

Details
##############################
Test: CheckSmatch - FAIL
Desc: Run smatch tool with source
Output:

Segmentation fault (core dumped)
make[4]: *** [scripts/Makefile.build:244: net/bluetooth/hci_core.o] Error 139
make[4]: *** Deleting file 'net/bluetooth/hci_core.o'
make[3]: *** [scripts/Makefile.build:485: net/bluetooth] Error 2
make[2]: *** [scripts/Makefile.build:485: net] Error 2
make[2]: *** Waiting for unfinished jobs....
Segmentation fault (core dumped)
make[4]: *** [scripts/Makefile.build:244: drivers/bluetooth/bcm203x.o] Error 139
make[4]: *** Deleting file 'drivers/bluetooth/bcm203x.o'
make[4]: *** Waiting for unfinished jobs....
Segmentation fault (core dumped)
make[4]: *** [scripts/Makefile.build:244: drivers/bluetooth/bpa10x.o] Error 139
make[4]: *** Deleting file 'drivers/bluetooth/bpa10x.o'
make[3]: *** [scripts/Makefile.build:485: drivers/bluetooth] Error 2
make[2]: *** [scripts/Makefile.build:485: drivers] Error 2
make[1]: *** [/github/workspace/src/src/Makefile:1919: .] Error 2
make: *** [Makefile:240: __sub-make] Error 2
##############################
Test: TestRunner_iso-tester - FAIL
Desc: Run iso-tester with test-runner
Output:
Total: 118, Passed: 117 (99.2%), Failed: 1, Not Run: 0

Failed Test Cases
ISO Connect2 Suspend - Success Failed 4.241 seconds


---
Regards,
Linux Bluetooth