[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191211150300.171772638@linuxfoundation.org>
Date: Wed, 11 Dec 2019 16:06:12 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org,
Jakob Unterwurzacher <jakob.unterwurzacher@...obroma-systems.com>,
Martin Elshuber <martin.elshuber@...obroma-systems.com>,
Philipp Tomsich <philipp.tomsich@...obroma-systems.com>,
Johan Hovold <johan@...nel.org>,
Marc Kleine-Budde <mkl@...gutronix.de>
Subject: [PATCH 5.4 81/92] can: ucan: fix non-atomic allocation in completion handler
From: Johan Hovold <johan@...nel.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@...r.kernel.org> # 4.19
Cc: Jakob Unterwurzacher <jakob.unterwurzacher@...obroma-systems.com>
Cc: Martin Elshuber <martin.elshuber@...obroma-systems.com>
Cc: Philipp Tomsich <philipp.tomsich@...obroma-systems.com>
Signed-off-by: Johan Hovold <johan@...nel.org>
Signed-off-by: Marc Kleine-Budde <mkl@...gutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.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,
Powered by blists - more mailing lists