diff options
author | Alexey Khoroshilov <khoroshilov@ispras.ru> | 2011-05-30 09:06:24 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-06-01 00:30:17 +0200 |
commit | 930a6eac9f40e692bd9670d89bcd9ac0f4019356 (patch) | |
tree | 9da346841ed70c260580d29e9462ad629d0f076f /drivers/net/usb | |
parent | sctp: stop pending timers and purge queues when peer restart asoc (diff) | |
download | linux-930a6eac9f40e692bd9670d89bcd9ac0f4019356.tar.xz linux-930a6eac9f40e692bd9670d89bcd9ac0f4019356.zip |
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>
Diffstat (limited to 'drivers/net/usb')
-rw-r--r-- | drivers/net/usb/catc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/usb/catc.c b/drivers/net/usb/catc.c index d7221c4a5dcf..8056f8a27c6a 100644 --- a/drivers/net/usb/catc.c +++ b/drivers/net/usb/catc.c @@ -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); } |