]> bbs.cooldavid.org Git - net-next-2.6.git/commit
netpoll: Fix RCU usage
authorHerbert Xu <herbert@gondor.apana.org.au>
Thu, 10 Jun 2010 16:12:44 +0000 (16:12 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 15 Jun 2010 17:58:38 +0000 (10:58 -0700)
commitde85d99eb7b595f6751550184b94c1e2f74a828b
tree950eea4329bfb2b5d94f2e242a86c36cf1fd49fc
parent36655042f9873efc2a90d251b9aef9b6b79d75d8
netpoll: Fix RCU usage

The use of RCU in netpoll is incorrect in a number of places:

1) The initial setting is lacking a write barrier.
2) The synchronize_rcu is in the wrong place.
3) Read barriers are missing.
4) Some places are even missing rcu_read_lock.
5) npinfo is zeroed after freeing.

This patch fixes those issues.  As most users are in BH context,
this also converts the RCU usage to the BH variant.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/netpoll.h
net/core/netpoll.c