Commit 6c0f3695 authored by Alexey Khoroshilov's avatar Alexey Khoroshilov Committed by Greg Kroah-Hartman

usb: host: max3421-hcd: unconditionally use GFP_ATOMIC in max3421_urb_enqueue()

As far as kzalloc() is called with spinlock held,
we have to pass GFP_ATOMIC regardless of mem_flags argument.

Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: default avatarAlexey Khoroshilov <khoroshilov@ispras.ru>
Acked-by: default avatarDavid Mosberger <davidm@egauge.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a2b63cb5
...@@ -1547,7 +1547,7 @@ max3421_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, gfp_t mem_flags) ...@@ -1547,7 +1547,7 @@ max3421_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, gfp_t mem_flags)
max3421_ep = urb->ep->hcpriv; max3421_ep = urb->ep->hcpriv;
if (!max3421_ep) { if (!max3421_ep) {
/* gets freed in max3421_endpoint_disable: */ /* gets freed in max3421_endpoint_disable: */
max3421_ep = kzalloc(sizeof(struct max3421_ep), mem_flags); max3421_ep = kzalloc(sizeof(struct max3421_ep), GFP_ATOMIC);
if (!max3421_ep) { if (!max3421_ep) {
retval = -ENOMEM; retval = -ENOMEM;
goto out; goto out;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment