Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 930a6eac authored by Alexey Khoroshilov's avatar Alexey Khoroshilov Committed by David S. Miller
Browse files

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: default avatarAlexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a000c01e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -495,7 +495,7 @@ static void catc_ctrl_run(struct catc *catc)
	if (!q->dir && q->buf && q->len)
		memcpy(catc->ctrl_buf, q->buf, q->len);

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