Patch "media: usbtv: Remove useless locks in usbtv_video_free()" has been added to the 6.6-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: usbtv: Remove useless locks in usbtv_video_free()

to the 6.6-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-usbtv-remove-useless-locks-in-usbtv_video_free.patch
and it can be found in the queue-6.6 subdirectory.

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



commit 0f3372c9c5ab6815db6e75f9f92b227009c52fa6
Author: Benjamin Gaignard <benjamin.gaignard@xxxxxxxxxxxxx>
Date:   Sat Mar 2 11:37:08 2024 +0100

    media: usbtv: Remove useless locks in usbtv_video_free()
    
    [ Upstream commit 65e6a2773d655172143cc0b927cdc89549842895 ]
    
    Remove locks calls in usbtv_video_free() because
    are useless and may led to a deadlock as reported here:
    https://syzkaller.appspot.com/x/bisect.txt?x=166dc872180000
    Also remove usbtv_stop() call since it will be called when
    unregistering the device.
    
    Before 'c838530d230b' this issue would only be noticed if you
    disconnect while streaming and now it is noticeable even when
    disconnecting while not streaming.
    
    Fixes: c838530d230b ("media: media videobuf2: Be more flexible on the number of queue stored buffers")
    Fixes: f3d27f34fdd7 ("[media] usbtv: Add driver for Fushicai USBTV007 video frame grabber")
    
    Signed-off-by: Benjamin Gaignard <benjamin.gaignard@xxxxxxxxxxxxx>
    Reviewed-by: Tomasz Figa <tfiga@xxxxxxxxxxxx>
    Tested-by: Hans Verkuil <hverkuil-cisco@xxxxxxxxx>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xxxxxxxxx>
    [hverkuil: fix minor spelling mistake in log message]
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/media/usb/usbtv/usbtv-video.c b/drivers/media/usb/usbtv/usbtv-video.c
index 1e30e05953dc6..7495df6b51912 100644
--- a/drivers/media/usb/usbtv/usbtv-video.c
+++ b/drivers/media/usb/usbtv/usbtv-video.c
@@ -962,15 +962,8 @@ int usbtv_video_init(struct usbtv *usbtv)
 
 void usbtv_video_free(struct usbtv *usbtv)
 {
-	mutex_lock(&usbtv->vb2q_lock);
-	mutex_lock(&usbtv->v4l2_lock);
-
-	usbtv_stop(usbtv);
 	vb2_video_unregister_device(&usbtv->vdev);
 	v4l2_device_disconnect(&usbtv->v4l2_dev);
 
-	mutex_unlock(&usbtv->v4l2_lock);
-	mutex_unlock(&usbtv->vb2q_lock);
-
 	v4l2_device_put(&usbtv->v4l2_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