can: dev: can_restart(): post buffer from the right context
authorAlejandro Concepcion Rodriguez <alejandro@acoro.eu>
Thu, 5 Nov 2020 21:51:47 +0000 (21:51 +0000)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Sun, 15 Nov 2020 17:24:35 +0000 (18:24 +0100)
commita1e654070a60d5d4f7cce59c38f4ca790bb79121
treee1bafb22f679d63d8dbe21464498d01f48ebfd6c
parent9aa9379d8f868e91719333a7f063ccccc0579acc
can: dev: can_restart(): post buffer from the right context

netif_rx() is meant to be called from interrupt contexts. can_restart() may be
called by can_restart_work(), which is called from a worqueue, so it may run in
process context. Use netif_rx_ni() instead.

Fixes: 39549eef3587 ("can: CAN Network device driver and Netlink interface")
Co-developed-by: Loris Fauster <loris.fauster@ttcontrol.com>
Signed-off-by: Loris Fauster <loris.fauster@ttcontrol.com>
Signed-off-by: Alejandro Concepcion Rodriguez <alejandro@acoro.eu>
Link: https://lore.kernel.org/r/4e84162b-fb31-3a73-fa9a-9438b4bd5234@acoro.eu
[mkl: use netif_rx_ni() instead of netif_rx_any_context()]
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/dev.c