]> git.baikalelectronics.ru Git - kernel.git/commit
netpoll: Add locking for netpoll_setup/cleanup
authorHerbert Xu <herbert@gondor.apana.org.au>
Thu, 10 Jun 2010 16:12:46 +0000 (16:12 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 15 Jun 2010 17:58:39 +0000 (10:58 -0700)
commit0e4f383919210c553f35cabcb144ed25058ddc5e
treeb50b944ea7ed9b5ee86fd389e6089f30b261e7ae
parent10e1ec743b8f4bf23ad1238e6e6aa06e573cdc51
netpoll: Add locking for netpoll_setup/cleanup

As it stands, netpoll_setup and netpoll_cleanup have no locking
protection whatsoever.  So chaos ensures if two entities try to
perform them on the same device.

This patch adds RTNL to the equation.  The code has been rearranged so
that bits that do not need RTNL protection are now moved to the top of
netpoll_setup.

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