lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 15 Nov 2020 18:41:19 +0100
From:   Marc Kleine-Budde <>
        Alejandro Concepcion Rodriguez <>,
        Loris Fauster <>,
        Marc Kleine-Budde <>
Subject: [net 03/15] can: dev: can_restart(): post buffer from the right context

From: Alejandro Concepcion Rodriguez <>

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 <>
Signed-off-by: Loris Fauster <>
Signed-off-by: Alejandro Concepcion Rodriguez <>
[mkl: use netif_rx_ni() instead of netif_rx_any_context()]
Signed-off-by: Marc Kleine-Budde <>
 drivers/net/can/dev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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_bytes += cf->can_dlc;

Powered by blists - more mailing lists