2024-05-24 10:14:32

by Dan Carpenter

[permalink] [raw]
Subject: [PATCH] Bluetooth: MGMT: Uninitialized variable in load_conn_param()

The "update" variable needs to be initialized to false.

Fixes: 831be422f3bb ("Bluetooth: MGMT: Make MGMT_OP_LOAD_CONN_PARAM update existing connection")
Signed-off-by: Dan Carpenter <[email protected]>
---
net/bluetooth/mgmt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 20eca8a9c681..3ab1558ff391 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -7865,8 +7865,8 @@ static int load_conn_param(struct sock *sk, struct hci_dev *hdev, void *data,
struct mgmt_conn_param *param = &cp->params[i];
struct hci_conn_params *hci_param;
u16 min, max, latency, timeout;
+ bool update = false;
u8 addr_type;
- bool update;

bt_dev_dbg(hdev, "Adding %pMR (type %u)", &param->addr.bdaddr,
param->addr.type);
--
2.43.0



2024-05-24 10:59:00

by bluez.test.bot

[permalink] [raw]
Subject: RE: Bluetooth: MGMT: Uninitialized variable in load_conn_param()

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=855655

---Test result---

Test Summary:
CheckPatch PASS 0.60 seconds
GitLint PASS 0.28 seconds
SubjectPrefix PASS 0.10 seconds
BuildKernel PASS 29.45 seconds
CheckAllWarning PASS 32.97 seconds
CheckSparse PASS 39.63 seconds
CheckSmatch FAIL 37.07 seconds
BuildKernel32 PASS 31.80 seconds
TestRunnerSetup PASS 531.78 seconds
TestRunner_l2cap-tester PASS 20.30 seconds
TestRunner_iso-tester FAIL 30.59 seconds
TestRunner_bnep-tester PASS 4.82 seconds
TestRunner_mgmt-tester PASS 109.62 seconds
TestRunner_rfcomm-tester PASS 7.37 seconds
TestRunner_sco-tester PASS 15.00 seconds
TestRunner_ioctl-tester PASS 7.82 seconds
TestRunner_mesh-tester PASS 5.82 seconds
TestRunner_smp-tester PASS 6.83 seconds
TestRunner_userchan-tester PASS 5.05 seconds
IncrementalBuild PASS 27.90 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....
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: 122, Passed: 117 (95.9%), Failed: 1, Not Run: 4

Failed Test Cases
ISO Connect2 Suspend - Success Failed 4.222 seconds


---
Regards,
Linux Bluetooth

2024-05-24 20:00:50

by patchwork-bot+bluetooth

[permalink] [raw]
Subject: Re: [PATCH] Bluetooth: MGMT: Uninitialized variable in load_conn_param()

Hello:

This patch was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <[email protected]>:

On Fri, 24 May 2024 13:14:02 +0300 you wrote:
> The "update" variable needs to be initialized to false.
>
> Fixes: 831be422f3bb ("Bluetooth: MGMT: Make MGMT_OP_LOAD_CONN_PARAM update existing connection")
> Signed-off-by: Dan Carpenter <[email protected]>
> ---
> net/bluetooth/mgmt.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

Here is the summary with links:
- Bluetooth: MGMT: Uninitialized variable in load_conn_param()
https://git.kernel.org/bluetooth/bluetooth-next/c/8e8f72ff2710

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html