can: fix NOHZ local_softirq_pending 08 warning
commitc115590dc5ed153892b2e92541a34387dc3e7453
authorOliver Hartkopp <oliver@hartkopp.net>
Tue, 15 Sep 2009 08:31:34 +0000 (15 01:31 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 5 Oct 2009 16:32:13 +0000 (5 09:32 -0700)
tree4c2363c2fd36b4adbc9acefd2df28dd15ad8f710
parentb9703d921e254b499b300d652b4f35420176d509
can: fix NOHZ local_softirq_pending 08 warning

commit 481a8199142c050b72bff8a1956a49fd0a75bbe0 upstream.

When using nanosleep() in an userspace application we get a ratelimit warning

NOHZ: local_softirq_pending 08

for 10 times.

The echo of CAN frames is done from process context and softirq context only.
Therefore the usage of netif_rx() was wrong (for years).

This patch replaces netif_rx() with netif_rx_ni() which has to be used from
process/softirq context. It also adds a missing comment that can_send() must
no be used from hardirq context.

Signed-off-by: Oliver Hartkopp <oliver@hartkopp.net>
Signed-off-by: Urs Thuermann <urs@isnogud.escape.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/can/vcan.c
net/can/af_can.c