Patch "Bluetooth: drop HCI device reference before return" has been added to the 5.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    Bluetooth: drop HCI device reference before return

to the 5.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     bluetooth-drop-hci-device-reference-before-return.patch
and it can be found in the queue-5.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit df06514aaf4b8e608314036fb2a0027373fdd9f6
Author: Pan Bian <bianpan2016@xxxxxxx>
Date:   Wed Jan 20 23:34:19 2021 -0800

    Bluetooth: drop HCI device reference before return
    
    [ Upstream commit 5a3ef03afe7e12982dc3b978f4c5077c907f7501 ]
    
    Call hci_dev_put() to decrement reference count of HCI device hdev if
    fails to duplicate memory.
    
    Fixes: 0b26ab9dce74 ("Bluetooth: AMP: Handle Accept phylink command status evt")
    Signed-off-by: Pan Bian <bianpan2016@xxxxxxx>
    Signed-off-by: Marcel Holtmann <marcel@xxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/bluetooth/a2mp.c b/net/bluetooth/a2mp.c
index cc26e4c047ad0..463bad58478b2 100644
--- a/net/bluetooth/a2mp.c
+++ b/net/bluetooth/a2mp.c
@@ -512,6 +512,7 @@ static int a2mp_createphyslink_req(struct amp_mgr *mgr, struct sk_buff *skb,
 		assoc = kmemdup(req->amp_assoc, assoc_len, GFP_KERNEL);
 		if (!assoc) {
 			amp_ctrl_put(ctrl);
+			hci_dev_put(hdev);
 			return -ENOMEM;
 		}
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux