]> git.karo-electronics.de Git - linux-beck.git/commit
netpoll: Disable IRQ around RCU dereference in netpoll_rx
authorHerbert Xu <herbert@gondor.apana.org.au>
Fri, 17 Sep 2010 23:55:03 +0000 (16:55 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 17 Sep 2010 23:55:03 +0000 (16:55 -0700)
commitf0f9deae9e7c421fa0c1c627beb8e174325e1ba7
tree7883b0c64cc16f1c3f3f4360a4dbcc214e6a6a22
parent4bdab43323b459900578b200a4b8cf9713ac8fab
netpoll: Disable IRQ around RCU dereference in netpoll_rx

We cannot use rcu_dereference_bh safely in netpoll_rx as we may
be called with IRQs disabled.  We could however simply disable
IRQs as that too causes BH to be disabled and is safe in either
case.

Thanks to John Linville for discovering this bug and providing
a patch.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/netpoll.h