Patchwork slcan: ldisc generated skbs are received in softirq context

login
register
mail settings
Submitter Oliver Hartkopp
Date Aug. 10, 2011, 3:18 p.m.
Message ID <4E42A163.5030208@hartkopp.net>
Download mbox | patch
Permalink /patch/109385/
State Accepted
Delegated to: David Miller
Headers show

Comments

Oliver Hartkopp - Aug. 10, 2011, 3:18 p.m.
As this discussion pointed out

http://marc.info/?l=linux-netdev&m=131257225602375

netdevices that are based on serial line disciplines should use netif_rx_ni()
when pushing received socketbuffers into the netdev rx queue.

Following commit 614851601c121b1320a35757ab88292d6272f906 ("slip: fix NOHZ
local_softirq_pending 08 warning") this patch updates the slcan driver
accordingly.

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
CC: Matvejchikov Ilya <matvejchikov@gmail.com>
CC: Alan Cox <alan@lxorguk.ukuu.org.uk>

---


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller - Aug. 11, 2011, 12:56 p.m.
From: Oliver Hartkopp <socketcan@hartkopp.net>
Date: Wed, 10 Aug 2011 17:18:59 +0200

> As this discussion pointed out
> 
> http://marc.info/?l=linux-netdev&m=131257225602375
> 
> netdevices that are based on serial line disciplines should use netif_rx_ni()
> when pushing received socketbuffers into the netdev rx queue.
> 
> Following commit 614851601c121b1320a35757ab88292d6272f906 ("slip: fix NOHZ
> local_softirq_pending 08 warning") this patch updates the slcan driver
> accordingly.
> 
> Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
> CC: Matvejchikov Ilya <matvejchikov@gmail.com>
> CC: Alan Cox <alan@lxorguk.ukuu.org.uk>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/drivers/net/can/slcan.c b/drivers/net/can/slcan.c
index f523f1c..4b70b7e 100644
--- a/drivers/net/can/slcan.c
+++ b/drivers/net/can/slcan.c
@@ -197,7 +197,7 @@  static void slc_bump(struct slcan *sl)
 	skb->ip_summed = CHECKSUM_UNNECESSARY;
 	memcpy(skb_put(skb, sizeof(struct can_frame)),
 	       &cf, sizeof(struct can_frame));
-	netif_rx(skb);
+	netif_rx_ni(skb);

 	sl->dev->stats.rx_packets++;
 	sl->dev->stats.rx_bytes += cf.can_dlc;