Patch "Bluetooth: hci_uart: add missing NULL check in h5_enqueue" has been added to the 5.15-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_uart: add missing NULL check in h5_enqueue

to the 5.15-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_uart-add-missing-null-check-in-h5_enqu.patch
and it can be found in the queue-5.15 subdirectory.

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



commit 0622c0e84f0fbea122242efdcdabee5af25f4740
Author: Pavel Skripkin <paskripkin@xxxxxxxxx>
Date:   Sun Mar 13 20:49:36 2022 +0300

    Bluetooth: hci_uart: add missing NULL check in h5_enqueue
    
    [ Upstream commit 32cb08e958696908a9aad5e49a78d74f7e32fffb ]
    
    Syzbot hit general protection fault in __pm_runtime_resume(). The problem
    was in missing NULL check.
    
    hu->serdev can be NULL and we should not blindly pass &serdev->dev
    somewhere, since it will cause GPF.
    
    Reported-by: syzbot+b9bd12fbed3485a3e51f@xxxxxxxxxxxxxxxxxxxxxxxxx
    Fixes: d9dd833cf6d2 ("Bluetooth: hci_h5: Add runtime suspend")
    Signed-off-by: Pavel Skripkin <paskripkin@xxxxxxxxx>
    Signed-off-by: Marcel Holtmann <marcel@xxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/bluetooth/hci_h5.c b/drivers/bluetooth/hci_h5.c
index d49a39d17d7d..e0ea9d25bb39 100644
--- a/drivers/bluetooth/hci_h5.c
+++ b/drivers/bluetooth/hci_h5.c
@@ -629,9 +629,11 @@ static int h5_enqueue(struct hci_uart *hu, struct sk_buff *skb)
 		break;
 	}
 
-	pm_runtime_get_sync(&hu->serdev->dev);
-	pm_runtime_mark_last_busy(&hu->serdev->dev);
-	pm_runtime_put_autosuspend(&hu->serdev->dev);
+	if (hu->serdev) {
+		pm_runtime_get_sync(&hu->serdev->dev);
+		pm_runtime_mark_last_busy(&hu->serdev->dev);
+		pm_runtime_put_autosuspend(&hu->serdev->dev);
+	}
 
 	return 0;
 }



[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