linux/net
Neil Horman 2cde6acd49 netpoll: Fix __netpoll_rcu_free so that it can hold the rtnl lock
__netpoll_rcu_free is used to free netpoll structures when the rtnl_lock is
already held.  The mechanism is used to asynchronously call __netpoll_cleanup
outside of the holding of the rtnl_lock, so as to avoid deadlock.
Unfortunately, __netpoll_cleanup modifies pointers (dev->np), which means the
rtnl_lock must be held while calling it.  Further, it cannot be held, because
rcu callbacks may be issued in softirq contexts, which cannot sleep.

Fix this by converting the rcu callback to a work queue that is guaranteed to
get scheduled in process context, so that we can hold the rtnl properly while
calling __netpoll_cleanup

Tested successfully by myself.

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
CC: "David S. Miller" <davem@davemloft.net>
CC: Cong Wang <amwang@redhat.com>
CC: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-02-11 19:19:33 -05:00
..
9p
802 mrp: make mrp_rcv static 2013-02-11 14:16:26 -05:00
8021q netpoll: Fix __netpoll_rcu_free so that it can hold the rtnl lock 2013-02-11 19:19:33 -05:00
appletalk
atm
ax25
batman-adv Included changes: 2013-01-29 15:59:45 -05:00
bluetooth Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-02-08 18:02:14 -05:00
bridge netpoll: Fix __netpoll_rcu_free so that it can hold the rtnl lock 2013-02-11 19:19:33 -05:00
caif
can can: rework skb reserved data handling 2013-01-28 18:17:25 -05:00
ceph
core netpoll: Fix __netpoll_rcu_free so that it can hold the rtnl lock 2013-02-11 19:19:33 -05:00
dcb
dccp
decnet net neighbour, decnet: Ensure to align device private data on preferred alignment. 2013-02-11 00:21:44 -05:00
dns_resolver
dsa dsa: make dsa_switch_setup check for valid port names 2013-01-21 15:40:12 -05:00
ethernet net: split eth_mac_addr for better error handling 2013-01-21 14:07:44 -05:00
ieee802154 6lowpan: use stack buffer instead of heap 2013-02-06 15:56:17 -05:00
ipv4 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-02-08 18:02:14 -05:00
ipv6 ipv6: by default join ff01::1 and in case of forwarding ff01::2 and ff05:2 2013-02-11 14:16:26 -05:00
ipx
irda net: remove redundant check for timer pending state before del_timer 2013-02-04 13:26:49 -05:00
iucv
key xfrm: Convert xfrm_addr_cmp() to boolean xfrm_addr_equal(). 2013-01-29 22:58:40 -05:00
l2tp Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-02-08 18:02:14 -05:00
lapb
llc
mac80211 Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next 2013-01-30 14:22:19 -05:00
mac802154 wpan: use stack buffer instead of heap 2013-02-06 15:56:17 -05:00
netfilter net: remove redundant check for timer pending state before del_timer 2013-02-04 13:26:49 -05:00
netlabel
netlink
netrom
nfc
openvswitch Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-02-08 18:02:14 -05:00
packet packet: fix leakage of tx_ring memory 2013-02-03 16:15:23 -05:00
phonet
rds
rfkill
rose
rxrpc
sched Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-02-05 14:12:20 -05:00
sctp Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-02-08 18:02:14 -05:00
sunrpc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2013-02-09 07:55:24 +11:00
tipc
unix
vmw_vsock VSOCK: Introduce VM Sockets 2013-02-10 19:41:08 -05:00
wimax
wireless Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem 2013-02-08 13:16:17 -05:00
x25
xfrm xfrm: Convert xfrm_addr_cmp() to boolean xfrm_addr_equal(). 2013-01-29 22:58:40 -05:00
compat.c
Kconfig VSOCK: Introduce VM Sockets 2013-02-10 19:41:08 -05:00
Makefile VSOCK: Introduce VM Sockets 2013-02-10 19:41:08 -05:00
nonet.c
socket.c ethtool: fix sparse warning 2013-02-11 14:16:26 -05:00
sysctl_net.c