summaryrefslogtreecommitdiff
path: root/drivers/net/can/usb
diff options
context:
space:
mode:
authorJohan Hovold <johan@kernel.org>2019-11-28 21:26:03 +0300
committerMarc Kleine-Budde <mkl@pengutronix.de>2019-12-03 13:15:08 +0300
commit870db5d1015c8bd63e93b579e857223c96249ff7 (patch)
treeeb2937c002fb8e738d850bf73fbc1a1cfa18afc6 /drivers/net/can/usb
parent9ebd796e24008f33f06ebea5a5e6aceb68b51794 (diff)
downloadlinux-870db5d1015c8bd63e93b579e857223c96249ff7.tar.xz
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 <stable@vger.kernel.org> # 4.19 Cc: Jakob Unterwurzacher <jakob.unterwurzacher@theobroma-systems.com> Cc: Martin Elshuber <martin.elshuber@theobroma-systems.com> Cc: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can/usb')
-rw-r--r--drivers/net/can/usb/ucan.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/can/usb/ucan.c b/drivers/net/can/usb/ucan.c
index 04aac3bb54ef..81e942f713e6 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,