From 0e41c51de9da584b49b0a2663e95e93bef42a3b0 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 10 Dec 2019 11:36:19 +0100 Subject: [PATCH] 5.3-stable patches added patches: can-ucan-fix-non-atomic-allocation-in-completion-handler.patch --- ...mic-allocation-in-completion-handler.patch | 36 +++++++++++++++++++ queue-5.3/series | 1 + 2 files changed, 37 insertions(+) create mode 100644 queue-5.3/can-ucan-fix-non-atomic-allocation-in-completion-handler.patch 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 index 00000000000..f4799946954 --- /dev/null +++ b/queue-5.3/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 +@@ -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, diff --git a/queue-5.3/series b/queue-5.3/series index fc0cb2016ed..fbb53ffcb3e 100644 --- a/queue-5.3/series +++ b/queue-5.3/series @@ -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 -- 2.47.3