[PATCH] media: uvcvideo: fix GFP_ flags in uvc_submit_urb()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Fixes: b20f917f84e6 ("media: uvcvideo: Use dma_alloc_noncontiguous API")
Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
---
 drivers/media/usb/uvc/uvc_video.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/usb/uvc/uvc_video.c b/drivers/media/usb/uvc/uvc_video.c
index cdd8eb500bb7..a777b389a66e 100644
--- a/drivers/media/usb/uvc/uvc_video.c
+++ b/drivers/media/usb/uvc/uvc_video.c
@@ -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




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux