aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlejandro Concepcion Rodriguez <[email protected]>2020-11-05 21:51:47 +0000
committerMarc Kleine-Budde <[email protected]>2020-11-15 18:24:35 +0100
commita1e654070a60d5d4f7cce59c38f4ca790bb79121 (patch)
treee1bafb22f679d63d8dbe21464498d01f48ebfd6c
parent9aa9379d8f868e91719333a7f063ccccc0579acc (diff)
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 <[email protected]> Signed-off-by: Loris Fauster <[email protected]> Signed-off-by: Alejandro Concepcion Rodriguez <[email protected]> Link: https://lore.kernel.org/r/[email protected] [mkl: use netif_rx_ni() instead of netif_rx_any_context()] Signed-off-by: Marc Kleine-Budde <[email protected]>
-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 6dee4f8f2024..81e39d7507d8 100644
--- a/drivers/net/can/dev.c
+++ b/drivers/net/can/dev.c
@@ -592,7 +592,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;