2023-09-18 12:04:04

by K, Kiran

[permalink] [raw]
Subject: [PATCH v1] Bluetooth: Release memory allocated to store supported codecs

Memory allocated to store local supported codecs needs to be freed
when BT is powered off.

Fixes: d0b137062b2d ("Bluetooth: hci_sync: Rework init stages")
Signed-off-by: Kiran K <[email protected]>
---
net/bluetooth/hci_sync.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c
index 1be5763c261c..3640d73f9595 100644
--- a/net/bluetooth/hci_sync.c
+++ b/net/bluetooth/hci_sync.c
@@ -5074,6 +5074,7 @@ int hci_dev_close_sync(struct hci_dev *hdev)
memset(hdev->eir, 0, sizeof(hdev->eir));
memset(hdev->dev_class, 0, sizeof(hdev->dev_class));
bacpy(&hdev->random_addr, BDADDR_ANY);
+ hci_codec_list_clear(&hdev->local_codecs);

hci_dev_put(hdev);
return err;
--
2.25.1


2023-09-18 21:50:11

by Luiz Augusto von Dentz

[permalink] [raw]
Subject: Re: [PATCH v1] Bluetooth: Release memory allocated to store supported codecs

Hi Kiran,

On Mon, Sep 18, 2023 at 5:04 AM Kiran K <[email protected]> wrote:
>
> Memory allocated to store local supported codecs needs to be freed
> when BT is powered off.
>
> Fixes: d0b137062b2d ("Bluetooth: hci_sync: Rework init stages")
> Signed-off-by: Kiran K <[email protected]>
> ---
> net/bluetooth/hci_sync.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c
> index 1be5763c261c..3640d73f9595 100644
> --- a/net/bluetooth/hci_sync.c
> +++ b/net/bluetooth/hci_sync.c
> @@ -5074,6 +5074,7 @@ int hci_dev_close_sync(struct hci_dev *hdev)
> memset(hdev->eir, 0, sizeof(hdev->eir));
> memset(hdev->dev_class, 0, sizeof(hdev->dev_class));
> bacpy(&hdev->random_addr, BDADDR_ANY);
> + hci_codec_list_clear(&hdev->local_codecs);
>
> hci_dev_put(hdev);
> return err;
> --
> 2.25.1

Ive sent a similar fix already:

https://patchwork.kernel.org/project/bluetooth/patch/[email protected]/


--
Luiz Augusto von Dentz

2023-09-19 02:58:28

by bluez.test.bot

[permalink] [raw]
Subject: RE: [v1] Bluetooth: Release memory allocated to store supported codecs

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

---Test result---

Test Summary:
CheckPatch PASS 0.63 seconds
GitLint PASS 0.30 seconds
SubjectPrefix PASS 0.10 seconds
BuildKernel PASS 36.67 seconds
CheckAllWarning PASS 37.35 seconds
CheckSparse PASS 41.66 seconds
CheckSmatch PASS 115.95 seconds
BuildKernel32 PASS 32.01 seconds
TestRunnerSetup PASS 493.63 seconds
TestRunner_l2cap-tester PASS 30.20 seconds
TestRunner_iso-tester PASS 49.75 seconds
TestRunner_bnep-tester PASS 9.83 seconds
TestRunner_mgmt-tester PASS 211.84 seconds
TestRunner_rfcomm-tester PASS 15.13 seconds
TestRunner_sco-tester PASS 18.48 seconds
TestRunner_ioctl-tester PASS 17.17 seconds
TestRunner_mesh-tester PASS 12.75 seconds
TestRunner_smp-tester PASS 13.56 seconds
TestRunner_userchan-tester PASS 10.38 seconds
IncrementalBuild PASS 31.00 seconds



---
Regards,
Linux Bluetooth

2023-09-20 04:47:38

by K, Kiran

[permalink] [raw]
Subject: RE: [PATCH v1] Bluetooth: Release memory allocated to store supported codecs

Hi Luiz,

>
> Ive sent a similar fix already:
>

I was not aware of it. Please ignore my patch. Thanks.

> https://patchwork.kernel.org/project/bluetooth/patch/20230915234742.3739
> [email protected]/
>
>
> --
> Luiz Augusto von Dentz