Patch "media: uvcvideo: Fix deadlock during uvc_probe" has been added to the 6.13-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

    media: uvcvideo: Fix deadlock during uvc_probe

to the 6.13-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:
     media-uvcvideo-fix-deadlock-during-uvc_probe.patch
and it can be found in the queue-6.13 subdirectory.

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



commit 4d2a6cc3acca51e59a76ab808057a9a0c2224a11
Author: Ricardo Ribalda <ribalda@xxxxxxxxxxxx>
Date:   Tue Oct 22 08:30:30 2024 +0000

    media: uvcvideo: Fix deadlock during uvc_probe
    
    [ Upstream commit a67f75c2b5ecf534eab416ce16c11fe780c4f8f6 ]
    
    If uvc_probe() fails, it can end up calling uvc_status_unregister() before
    uvc_status_init() is called.
    
    Fix this by checking if dev->status is NULL or not in
    uvc_status_unregister().
    
    Reported-by: syzbot+9446d5e0d25571e6a212@xxxxxxxxxxxxxxxxxxxxxxxxx
    Closes: https://lore.kernel.org/linux-media/20241020160249.GD7770@xxxxxxxxxxxxxxxxxxxxxxxxxx/T/#m506744621d72a2ace5dd2ab64055be9898112dbd
    Fixes: c5fe3ed618f9 ("media: uvcvideo: Avoid race condition during unregister")
    Signed-off-by: Ricardo Ribalda <ribalda@xxxxxxxxxxxx>
    Reviewed-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20241022-race-unreg-v1-1-2212f364d9de@xxxxxxxxxxxx
    Signed-off-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/media/usb/uvc/uvc_status.c b/drivers/media/usb/uvc/uvc_status.c
index 06c867510c8fe..f37417634ee94 100644
--- a/drivers/media/usb/uvc/uvc_status.c
+++ b/drivers/media/usb/uvc/uvc_status.c
@@ -294,6 +294,9 @@ int uvc_status_init(struct uvc_device *dev)
 
 void uvc_status_unregister(struct uvc_device *dev)
 {
+	if (!dev->status)
+		return;
+
 	uvc_status_suspend(dev);
 	uvc_input_unregister(dev);
 }




[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