From: Greg Kroah-Hartman Date: Tue, 10 Dec 2019 10:36:02 +0000 (+0100) Subject: 4.19-stable patches X-Git-Tag: v5.4.3~32 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=10fb8e9bdf803754cc6468ea457a6a7be7af227c;p=thirdparty%2Fkernel%2Fstable-queue.git 4.19-stable patches added patches: can-ucan-fix-non-atomic-allocation-in-completion-handler.patch --- diff --git a/queue-4.19/can-ucan-fix-non-atomic-allocation-in-completion-handler.patch b/queue-4.19/can-ucan-fix-non-atomic-allocation-in-completion-handler.patch new file mode 100644 index 00000000000..a84e6ba55eb --- /dev/null +++ b/queue-4.19/can-ucan-fix-non-atomic-allocation-in-completion-handler.patch @@ -0,0 +1,36 @@ +From 870db5d1015c8bd63e93b579e857223c96249ff7 Mon Sep 17 00:00:00 2001 +From: Johan Hovold +Date: Thu, 28 Nov 2019 19:26:03 +0100 +Subject: can: ucan: fix non-atomic allocation in completion handler + +From: Johan Hovold + +commit 870db5d1015c8bd63e93b579e857223c96249ff7 upstream. + +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 +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/can/usb/ucan.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/net/can/usb/ucan.c ++++ b/drivers/net/can/usb/ucan.c +@@ -796,7 +796,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, diff --git a/queue-4.19/series b/queue-4.19/series index e1d85d0ee44..d96f03ac353 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -239,3 +239,4 @@ crypto-ecdh-fix-big-endian-bug-in-ecc-library.patch crypto-user-fix-memory-leak-in-crypto_report.patch spi-atmel-fix-cs-high-support.patch mwifiex-update-set_mac_address-logic.patch +can-ucan-fix-non-atomic-allocation-in-completion-handler.patch