mirror of
https://github.com/torvalds/linux.git
synced 2024-12-02 00:51:44 +00:00
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: 9f2d3eae88
("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>
This commit is contained in:
parent
9ebd796e24
commit
870db5d101
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user