diff mbox series

[BlueZ,v1,1/3] btdev: Fix not clearing le_pa_sync_handle on reset

Message ID 20240125142936.3373953-1-luiz.dentz@gmail.com (mailing list archive)
State Accepted
Commit 460dd92431ea328b88bbdb1169fcb06b755d5c6f
Headers show
Series [BlueZ,v1,1/3] btdev: Fix not clearing le_pa_sync_handle on reset | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
tedd_an/CheckPatch success CheckPatch PASS
tedd_an/GitLint success Gitlint PASS
tedd_an/BuildEll success Build ELL PASS
tedd_an/BluezMake success Bluez Make PASS
tedd_an/MakeCheck success Bluez Make Check PASS
tedd_an/MakeDistcheck success Make Distcheck PASS
tedd_an/CheckValgrind success Check Valgrind PASS
tedd_an/CheckSmatch warning CheckSparse WARNING emulator/btdev.c:420:29: warning: Variable length array is used.
tedd_an/bluezmakeextell success Make External ELL PASS
tedd_an/IncrementalBuild success Incremental Build PASS
tedd_an/ScanBuild warning ScanBuild: emulator/btdev.c:1084:10: warning: Although the value stored to 'conn' is used in the enclosing expression, the value is never actually read from 'conn' while ((conn = queue_find(dev->conns, match_handle, ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ emulator/btdev.c:1335:24: warning: Access to field 'link' results in a dereference of a null pointer (loaded from variable 'conn') pending_conn_del(dev, conn->link->dev); ^~~~~~~~~~ emulator/btdev.c:1457:13: warning: Access to field 'dev' results in a dereference of a null pointer (loaded from variable 'conn') send_event(conn->dev, BT_HCI_EVT_AUTH_COMPLETE, &ev, sizeof(ev)); ^~~~~~~~~ 3 warnings generated.

Commit Message

Luiz Augusto von Dentz Jan. 25, 2024, 2:29 p.m. UTC
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

le_pa_sync_handle needs to be clear on reset otherwise the coce won't
be able to handle Create PA Sync commands.
---
 emulator/btdev.c | 1 +
 1 file changed, 1 insertion(+)

Comments

bluez.test.bot@gmail.com Jan. 25, 2024, 3:55 p.m. UTC | #1
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=819897

---Test result---

Test Summary:
CheckPatch                    PASS      0.93 seconds
GitLint                       PASS      0.67 seconds
BuildEll                      PASS      24.08 seconds
BluezMake                     PASS      724.48 seconds
MakeCheck                     PASS      11.50 seconds
MakeDistcheck                 PASS      160.61 seconds
CheckValgrind                 PASS      226.22 seconds
CheckSmatch                   WARNING   334.66 seconds
bluezmakeextell               PASS      112.05 seconds
IncrementalBuild              PASS      2072.65 seconds
ScanBuild                     WARNING   943.15 seconds

Details
##############################
Test: CheckSmatch - WARNING
Desc: Run smatch tool with source
Output:
emulator/btdev.c:420:29: warning: Variable length array is used.
##############################
Test: ScanBuild - WARNING
Desc: Run Scan Build
Output:
emulator/btdev.c:1084:10: warning: Although the value stored to 'conn' is used in the enclosing expression, the value is never actually read from 'conn'
        while ((conn = queue_find(dev->conns, match_handle,
                ^      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
emulator/btdev.c:1335:24: warning: Access to field 'link' results in a dereference of a null pointer (loaded from variable 'conn')
        pending_conn_del(dev, conn->link->dev);
                              ^~~~~~~~~~
emulator/btdev.c:1457:13: warning: Access to field 'dev' results in a dereference of a null pointer (loaded from variable 'conn')
        send_event(conn->dev, BT_HCI_EVT_AUTH_COMPLETE, &ev, sizeof(ev));
                   ^~~~~~~~~
3 warnings generated.



---
Regards,
Linux Bluetooth
patchwork-bot+bluetooth@kernel.org Jan. 25, 2024, 7:10 p.m. UTC | #2
Hello:

This series was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Thu, 25 Jan 2024 09:29:34 -0500 you wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> 
> le_pa_sync_handle needs to be clear on reset otherwise the coce won't
> be able to handle Create PA Sync commands.
> ---
>  emulator/btdev.c | 1 +
>  1 file changed, 1 insertion(+)

Here is the summary with links:
  - [BlueZ,v1,1/3] btdev: Fix not clearing le_pa_sync_handle on reset
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=460dd92431ea
  - [BlueZ,v1,2/3] device: Add btd_device_set_connectable
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=7a1c6f31ed4f
  - [BlueZ,v1,3/3] bap: Mark device as connectable if a broadcast Endpoint is found
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=35858e173aad

You are awesome, thank you!
diff mbox series

Patch

diff --git a/emulator/btdev.c b/emulator/btdev.c
index 65ad0a40cb43..da94f29d12aa 100644
--- a/emulator/btdev.c
+++ b/emulator/btdev.c
@@ -562,6 +562,7 @@  static void btdev_reset(struct btdev *btdev)
 	btdev->le_scan_enable		= 0x00;
 	btdev->le_adv_enable		= 0x00;
 	btdev->le_pa_enable		= 0x00;
+	btdev->le_pa_sync_handle	= 0x0000;
 
 	al_clear(btdev);
 	rl_clear(btdev);