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

Commit 49c9e7c2 authored by Alexey Khoroshilov's avatar Alexey Khoroshilov Committed by David S. Miller
Browse files

usb/kaweth: use GFP_ATOMIC under spin_lock in usb_start_wait_urb()



Commit e4c7f259 ("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: default avatarAlexey Khoroshilov <khoroshilov@ispras.ru>
Acked-by: default avatarOliver Neukum <oliver@neukum.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent eddd63a6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);