Skip to content

Commit

Permalink
usb/kaweth: use GFP_ATOMIC under spin_lock in usb_start_wait_urb()
Browse files Browse the repository at this point in the history
Commit e4c7f25 ("USB: kaweth.c: use GFP_ATOMIC under spin_lock")
makes sure that kaweth_internal_control_msg() allocates memory with GFP_ATOMIC,
but kaweth_internal_control_msg() also calls usb_start_wait_urb()
that still allocates memory with GFP_NOIO.

The patch fixes usb_start_wait_urb() as well.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Acked-by: Oliver Neukum <oliver@neukum.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Alexey Khoroshilov authored and David S. Miller committed Jan 12, 2015
1 parent eddd63a commit 49c9e7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/usb/kaweth.c
Original file line number Diff line number Diff line change
Expand Up @@ -1276,7 +1276,7 @@ static int usb_start_wait_urb(struct urb *urb, int timeout, int* actual_length)
awd.done = 0;

urb->context = &awd;
status = usb_submit_urb(urb, GFP_NOIO);
status = usb_submit_urb(urb, GFP_ATOMIC);
if (status) {
// something went wrong
usb_free_urb(urb);
Expand Down

0 comments on commit 49c9e7c

Please sign in to comment.