summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlejandro Concepcion Rodriguez <alejandro@acoro.eu>2020-11-05 21:51:47 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-11-24 12:48:11 +0100
commit48c5c20b02d8c690b419d7bc911c08033161fc0a (patch)
tree4cdbe04575575c33ed04e58cdbe704217b5f7f5b
parent8c1a6a13f146b7f0bbb24f8e7848e576a5ebf9ed (diff)
can: dev: can_restart(): post buffer from the right context
[ Upstream commit a1e654070a60d5d4f7cce59c38f4ca790bb79121 ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/net/can/dev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/can/dev.c b/drivers/net/can/dev.c
index 9579dae54af2..52110017fd40 100644
--- a/drivers/net/can/dev.c
+++ b/drivers/net/can/dev.c
@@ -525,7 +525,7 @@ static void can_restart(struct net_device *dev)
}
cf->can_id |= CAN_ERR_RESTARTED;
- netif_rx(skb);
+ netif_rx_ni(skb);
stats->rx_packets++;
stats->rx_bytes += cf->can_dlc;