]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
can: ucan: fix non-atomic allocation in completion handler
authorJohan Hovold <johan@kernel.org>
Thu, 28 Nov 2019 18:26:03 +0000 (19:26 +0100)
committerMarcelo Henrique Cerri <marcelo.cerri@canonical.com>
Fri, 17 Jan 2020 17:23:32 +0000 (14:23 -0300)
commit2dcc5fab019dfdd84b141212b20c65ed41e7d19a
tree90151d9eada50df71579fbf4e514118bcbf4ef87
parent8e926aecb03e09a6cd7d8532929538e1651b497d
can: ucan: fix non-atomic allocation in completion handler

BugLink: https://bugs.launchpad.net/bugs/1856334
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>
Signed-off-by: Connor Kuehl <connor.kuehl@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/net/can/usb/ucan.c