From: Johan Hovold Date: Thu, 28 Nov 2019 18:26:03 +0000 (+0100) Subject: can: ucan: fix non-atomic allocation in completion handler X-Git-Tag: v5.10.7~3665^2~46^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=870db5d1015c8bd63e93b579e857223c96249ff7;p=platform%2Fkernel%2Flinux-rpi.git can: ucan: fix non-atomic allocation in completion handler USB completion handlers are called in atomic context and must specifically not allocate memory using GFP_KERNEL. Fixes: 9f2d3eae88d2 ("can: ucan: add driver for Theobroma Systems UCAN devices") Cc: stable # 4.19 Cc: Jakob Unterwurzacher Cc: Martin Elshuber Cc: Philipp Tomsich Signed-off-by: Johan Hovold Signed-off-by: Marc Kleine-Budde --- diff --git a/drivers/net/can/usb/ucan.c b/drivers/net/can/usb/ucan.c index 04aac3b..81e942f 100644 --- a/drivers/net/can/usb/ucan.c +++ b/drivers/net/can/usb/ucan.c @@ -792,7 +792,7 @@ resubmit: up); usb_anchor_urb(urb, &up->rx_urbs); - ret = usb_submit_urb(urb, GFP_KERNEL); + ret = usb_submit_urb(urb, GFP_ATOMIC); if (ret < 0) { netdev_err(up->netdev,