Skip to content

Commit 930a6ea

Browse files
khoroshilovdavem330
authored andcommitted
drivers/net/usb/catc.c: Fix potential deadlock in catc_ctrl_run()
catc_ctrl_run() calls usb_submit_urb() with GFP_KERNEL, while it is called from catc_ctrl_async() and catc_ctrl_done() with catc->ctrl_lock spinlock held. The patch replaces GFP_KERNEL with GFP_ATOMIC. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent a000c01 commit 930a6ea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/usb/catc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ static void catc_ctrl_run(struct catc *catc)
495495
if (!q->dir && q->buf && q->len)
496496
memcpy(catc->ctrl_buf, q->buf, q->len);
497497

498-
if ((status = usb_submit_urb(catc->ctrl_urb, GFP_KERNEL)))
498+
if ((status = usb_submit_urb(catc->ctrl_urb, GFP_ATOMIC)))
499499
err("submit(ctrl_urb) status %d", status);
500500
}
501501

0 commit comments

Comments
 (0)