2022-07-26 15:17:05

by Dan Carpenter

[permalink] [raw]
Subject: [PATCH] Bluetooth: mgmt: Fix double free on error path

Don't call mgmt_pending_remove() twice (double free).

Fixes: 6b88eff43704 ("Bluetooth: hci_sync: Refactor remove Adv Monitor")
Signed-off-by: Dan Carpenter <[email protected]>
---
net/bluetooth/mgmt.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 0c6878095709..2bca36b9f3a2 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -5056,7 +5056,6 @@ static int remove_adv_monitor(struct sock *sk, struct hci_dev *hdev,
else
status = MGMT_STATUS_FAILED;

- mgmt_pending_remove(cmd);
goto unlock;
}

--
2.35.1


2022-07-26 16:17:44

by bluez.test.bot

[permalink] [raw]
Subject: RE: Bluetooth: mgmt: Fix double free on error path

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

---Test result---

Test Summary:
CheckPatch PASS 1.91 seconds
GitLint PASS 1.22 seconds
SubjectPrefix PASS 0.94 seconds
BuildKernel PASS 33.00 seconds
BuildKernel32 PASS 28.54 seconds
Incremental Build with patchesPASS 41.68 seconds
TestRunner: Setup PASS 478.13 seconds
TestRunner: l2cap-tester PASS 16.71 seconds
TestRunner: bnep-tester PASS 6.27 seconds
TestRunner: mgmt-tester PASS 98.49 seconds
TestRunner: rfcomm-tester PASS 9.46 seconds
TestRunner: sco-tester PASS 9.30 seconds
TestRunner: smp-tester PASS 9.38 seconds
TestRunner: userchan-tester PASS 6.41 seconds



---
Regards,
Linux Bluetooth

2022-07-29 00:11:46

by patchwork-bot+bluetooth

[permalink] [raw]
Subject: Re: [PATCH] Bluetooth: mgmt: Fix double free on error path

Hello:

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

On Tue, 26 Jul 2022 18:13:44 +0300 you wrote:
> Don't call mgmt_pending_remove() twice (double free).
>
> Fixes: 6b88eff43704 ("Bluetooth: hci_sync: Refactor remove Adv Monitor")
> Signed-off-by: Dan Carpenter <[email protected]>
> ---
> net/bluetooth/mgmt.c | 1 -
> 1 file changed, 1 deletion(-)

Here is the summary with links:
- Bluetooth: mgmt: Fix double free on error path
https://git.kernel.org/bluetooth/bluetooth-next/c/b7d8b9c71aa2

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