]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.3-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 Dec 2019 10:36:19 +0000 (11:36 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 Dec 2019 10:36:19 +0000 (11:36 +0100)
added patches:
can-ucan-fix-non-atomic-allocation-in-completion-handler.patch

queue-5.3/can-ucan-fix-non-atomic-allocation-in-completion-handler.patch [new file with mode: 0644]
queue-5.3/series

diff --git a/queue-5.3/can-ucan-fix-non-atomic-allocation-in-completion-handler.patch b/queue-5.3/can-ucan-fix-non-atomic-allocation-in-completion-handler.patch
new file mode 100644 (file)
index 0000000..f479994
--- /dev/null
@@ -0,0 +1,36 @@
+From 870db5d1015c8bd63e93b579e857223c96249ff7 Mon Sep 17 00:00:00 2001
+From: Johan Hovold <johan@kernel.org>
+Date: Thu, 28 Nov 2019 19:26:03 +0100
+Subject: can: ucan: fix non-atomic allocation in completion handler
+
+From: Johan Hovold <johan@kernel.org>
+
+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 <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>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ 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
+@@ -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,
index fc0cb2016ed3af202e44535b753a3c55362af9b1..fbb53ffcb3efa7014d719af9a71bf973664a890f 100644 (file)
@@ -95,3 +95,4 @@ spi-stm32-qspi-fix-kernel-oops-when-unbinding-driver.patch
 spi-atmel-fix-cs-high-support.patch
 spi-fix-spi_cs_high-setting-when-using-native-and-gpio-cs.patch
 spi-fix-null-pointer-when-setting-spi_cs_high-for-gpio-cs.patch
+can-ucan-fix-non-atomic-allocation-in-completion-handler.patch