media: uvcvideo: fix GFP_ flags in uvc_submit_urb()
Subsystems (3)
PATCH 1/1 media: uvcvideo: fix GFP_ flags in uvc_submit_urb()
The uvc_submit_urb() function is supposed to use the passed in GFP_ flags but this code accidentally uses GFP_KERNEL instead. Some of the callers are passing GFP_ATOMIC so presumably this can lead to sleeping in atomic context.
--- drivers/media/usb/uvc/uvc_video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/usb/uvc/uvc_video.c +1 -1
@@ -1119,7 +1119,7 @@ static int uvc_submit_urb(struct uvc_urb *uvc_urb, gfp_t mem_flags)dma_sync_sgtable_for_device (uvc_stream_to_dmadev (uvc_urb->stream), uvc_urb->sgt,uvc_stream_dir (uvc_urb->stream)); -return usb_submit_urb (uvc_urb->urb,GFP_KERNEL ); +return usb_submit_urb (uvc_urb->urb, mem_flags); }/*
Signature · 1 line
2.30.2
Hi Dan
Quoted 8 lines · Dan Carpenter
The
uvc_submit_urb()function is supposed to use the passed inGFP_flags but this code accidentally usesGFP_KERNELinstead. Some of the callers are passingGFP_ATOMICso presumably this can lead to sleeping in atomic context.Fixes b20f917f84e6 ("media: uvcvideo: Use dma_alloc_noncontiguous API")Signed-off-by Dan Carpenter <[email protected]>
I reported the same issue just some minutes ago. Christoph has already fixed the patch in his tree.
Where did you get the patchset? from next? from linus? or directly from Chirstoph tree?
Thanks!
Quoted 20 lines
--- drivers/media/usb/uvc/uvc_video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/media/usb/uvc/uvc_video.c +1
-2@@ -1119,7 +1119,7 @@ static int uvc_submit_urb(struct uvc_urb *uvc_urb, gfp_t mem_flags)dma_sync_sgtable_for_device (uvc_stream_to_dmadev (uvc_urb->stream), uvc_urb->sgt,uvc_stream_dir (uvc_urb->stream)); -return usb_submit_urb (uvc_urb->urb,GFP_KERNEL ); +return usb_submit_urb (uvc_urb->urb, mem_flags); }/* -- 2.30.2
Signature · 1 line
Ricardo Ribalda
Quoted 9 lines · Ricardo Ribalda Delgado
Hi Dan
Quoted 6 lines · Dan Carpenter
The
uvc_submit_urb()function is supposed to use the passed inGFP_flags but this code accidentally usesGFP_KERNELinstead. Some of the callers are passingGFP_ATOMICso presumably this can lead to sleeping in atomic context.
Quoted 8 lines
Quoted 2 lines
Fixes b20f917f84e6 ("media: uvcvideo: Use dma_alloc_noncontiguous API")Signed-off-by Dan Carpenter <[email protected]>I reported the same issue just some minutes ago. Christoph has already fixed the patch in his tree.
Where did you get the patchset? from next? from linus? or directly from Chirstoph tree?
From linux-next. I'm not sure if it was from yesterday's linux-next or from a couple days ago.
regards,
dan carpenter