Patch "Bluetooth: hci_event: Fix wrongly recorded wakeup BD_ADDR" has been added to the 6.7-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: hci_event: Fix wrongly recorded wakeup BD_ADDR

to the 6.7-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-hci_event-fix-wrongly-recorded-wakeup-bd_a.patch
and it can be found in the queue-6.7 subdirectory.

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



commit f410dcb58db1060bb11efcb2485f5b99845b3239
Author: Zijun Hu <quic_zijuhu@xxxxxxxxxxx>
Date:   Tue Jan 9 19:03:23 2024 +0800

    Bluetooth: hci_event: Fix wrongly recorded wakeup BD_ADDR
    
    [ Upstream commit 61a5ab72edea7ebc3ad2c6beea29d966f528ebfb ]
    
    hci_store_wake_reason() wrongly parses event HCI_Connection_Request
    as HCI_Connection_Complete and HCI_Connection_Complete as
    HCI_Connection_Request, so causes recording wakeup BD_ADDR error and
    potential stability issue, fix it by using the correct field.
    
    Fixes: 2f20216c1d6f ("Bluetooth: Emit controller suspend and resume events")
    Signed-off-by: Zijun Hu <quic_zijuhu@xxxxxxxxxxx>
    Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index ef8c3bed73617..22b22c264c2a5 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -7420,10 +7420,10 @@ static void hci_store_wake_reason(struct hci_dev *hdev, u8 event,
 	 * keep track of the bdaddr of the connection event that woke us up.
 	 */
 	if (event == HCI_EV_CONN_REQUEST) {
-		bacpy(&hdev->wake_addr, &conn_complete->bdaddr);
+		bacpy(&hdev->wake_addr, &conn_request->bdaddr);
 		hdev->wake_addr_type = BDADDR_BREDR;
 	} else if (event == HCI_EV_CONN_COMPLETE) {
-		bacpy(&hdev->wake_addr, &conn_request->bdaddr);
+		bacpy(&hdev->wake_addr, &conn_complete->bdaddr);
 		hdev->wake_addr_type = BDADDR_BREDR;
 	} else if (event == HCI_EV_LE_META) {
 		struct hci_ev_le_meta *le_ev = (void *)skb->data;




[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