diff mbox series

[v1] Bluetooth: Release memory allocated to store supported codecs

Message ID 20230918093517.2163899-1-kiran.k@intel.com (mailing list archive)
State Superseded
Headers show
Series [v1] Bluetooth: Release memory allocated to store supported codecs | 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/SubjectPrefix success Gitlint PASS
tedd_an/BuildKernel success BuildKernel PASS
tedd_an/CheckAllWarning success CheckSparse PASS
tedd_an/CheckSparse success CheckSparse PASS
tedd_an/CheckSmatch success CheckSparse PASS
tedd_an/BuildKernel32 success BuildKernel32 PASS
tedd_an/TestRunnerSetup success TestRunnerSetup PASS
tedd_an/TestRunner_l2cap-tester success TestRunner PASS
tedd_an/TestRunner_iso-tester success TestRunner PASS
tedd_an/TestRunner_bnep-tester success TestRunner PASS
tedd_an/TestRunner_mgmt-tester success TestRunner PASS
tedd_an/TestRunner_rfcomm-tester success TestRunner PASS
tedd_an/TestRunner_sco-tester success TestRunner PASS
tedd_an/TestRunner_ioctl-tester success TestRunner PASS
tedd_an/TestRunner_mesh-tester success TestRunner PASS
tedd_an/TestRunner_smp-tester success TestRunner PASS
tedd_an/TestRunner_userchan-tester success TestRunner PASS
tedd_an/IncrementalBuild success Incremental Build PASS

Commit Message

K, Kiran Sept. 18, 2023, 9:35 a.m. UTC
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 <kiran.k@intel.com>
---
 net/bluetooth/hci_sync.c | 1 +
 1 file changed, 1 insertion(+)

Comments

bluez.test.bot@gmail.com Sept. 18, 2023, 10:01 a.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=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
Luiz Augusto von Dentz Sept. 18, 2023, 5:37 p.m. UTC | #2
Hi Kiran,

On Mon, Sep 18, 2023 at 5:04 AM Kiran K <kiran.k@intel.com> 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 <kiran.k@intel.com>
> ---
>  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/20230915234742.3739283-2-luiz.dentz@gmail.com/
K, Kiran Sept. 20, 2023, 4:34 a.m. UTC | #3
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
> 283-2-luiz.dentz@gmail.com/
> 
> 
> --
> Luiz Augusto von Dentz
diff mbox series

Patch

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;