Johannes Berg
d136f1bd36
genetlink: fix netns vs. netlink table locking
...
Since my commits introducing netns awareness into
genetlink we can get this problem:
BUG: scheduling while atomic: modprobe/1178/0x00000002
2 locks held by modprobe/1178:
#0 : (genl_mutex){+.+.+.}, at: [<ffffffff8135ee1a>] genl_register_mc_grou
#1 : (rcu_read_lock){.+.+..}, at: [<ffffffff8135eeb5>] genl_register_mc_g
Pid: 1178, comm: modprobe Not tainted 2.6.31-rc8-wl-34789-g95cb731-dirty #
Call Trace:
[<ffffffff8103e285>] __schedule_bug+0x85/0x90
[<ffffffff81403138>] schedule+0x108/0x588
[<ffffffff8135b131>] netlink_table_grab+0xa1/0xf0
[<ffffffff8135c3a7>] netlink_change_ngroups+0x47/0x100
[<ffffffff8135ef0f>] genl_register_mc_group+0x12f/0x290
because I overlooked that netlink_table_grab() will
schedule, thinking it was just the rwlock. However,
in the contention case, that isn't actually true.
Fix this by letting the code grab the netlink table
lock first and then the RCU for netns protection.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-09-14 17:02:50 -07:00
..
9p
net/9p: insulate the client against an invalid error code sent by a 9p server
2009-08-17 16:39:54 -05:00
802
net: remove COMPAT_NET_DEV_OPS
2009-05-25 01:53:53 -07:00
8021q
vlan: adds drops accounting
2009-09-03 20:02:17 -07:00
appletalk
Have atalk_route_packet() return NET_RX_SUCCESS not NET_XMIT_SUCCESS
2009-09-14 17:02:47 -07:00
atm
atm/br2684: netif_stop_queue() when atm device busy and netif_wake_queue() when we can send packets again.
2009-09-02 23:46:10 -07:00
ax25
net: Move rx skb_orphan call to where needed
2009-06-23 16:36:25 -07:00
bluetooth
net: Add DEVTYPE support for Ethernet based devices
2009-09-11 12:54:55 -07:00
bridge
net: Add DEVTYPE support for Ethernet based devices
2009-09-11 12:54:55 -07:00
can
can: use correct NET_RX_ return values
2009-08-30 22:13:18 -07:00
core
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
2009-09-14 10:37:28 -07:00
dcb
dcbnl: Add implementations of dcbnl setapp/getapp commands
2009-09-01 01:24:36 -07:00
dccp
inet: inet_connection_sock_af_ops const
2009-09-02 01:03:49 -07:00
decnet
net: make neigh_ops constant
2009-09-01 17:40:57 -07:00
dsa
netdev: convert pseudo-devices to netdev_tx_t
2009-09-01 01:13:07 -07:00
econet
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
2009-08-12 17:44:53 -07:00
ethernet
net: remove COMPAT_NET_DEV_OPS
2009-05-25 01:53:53 -07:00
ieee802154
Drop ARPHRD_IEEE802154_PHY
2009-08-19 23:08:24 +04:00
ipv4
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
2009-09-14 10:37:28 -07:00
ipv6
ipv6: Add IFA_F_DADFAILED flag
2009-09-11 12:54:58 -07:00
ipx
headers: smp_lock.h redux
2009-07-12 12:22:34 -07:00
irda
net: file_operations should be const
2009-09-02 01:03:53 -07:00
iucv
net: adding memory barrier to the poll and receive callbacks
2009-07-09 17:06:57 -07:00
key
net: file_operations should be const
2009-09-02 01:03:53 -07:00
lapb
net: remove NET_RX_BAD and NET_RX_CN* defines
2009-07-05 19:15:35 -07:00
llc
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
2009-09-02 00:32:56 -07:00
mac80211
net: Add DEVTYPE support for Ethernet based devices
2009-09-11 12:54:55 -07:00
netfilter
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-next-2.6
2009-09-10 18:17:09 -07:00
netlabel
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
2009-07-30 19:22:43 -07:00
netlink
genetlink: fix netns vs. netlink table locking
2009-09-14 17:02:50 -07:00
netrom
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
2009-09-02 00:32:56 -07:00
packet
af_packet: style cleanups
2009-07-23 18:01:10 -07:00
phonet
Phonet: back-end for autoconfigured addresses
2009-09-11 12:55:06 -07:00
rds
RDS: Add a debug message suggesting to load transport modules
2009-08-23 19:13:14 -07:00
rfkill
rfkill: add the GPS radio type
2009-08-04 16:44:23 -04:00
rose
convert hamradio drivers to netdev_txreturnt_t
2009-09-01 01:13:12 -07:00
rxrpc
net: mark read-only arrays as const
2009-08-05 10:42:58 -07:00
sched
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
2009-09-14 10:37:28 -07:00
sctp
sctp: Catch bogus stream sequence numbers
2009-09-04 18:21:03 -04:00
sunrpc
Merge branch 'nfs-for-2.6.32'
2009-09-11 14:59:37 -04:00
tipc
tipc: fix test of bearer_priority range in tipc_register_media()
2009-08-29 00:19:42 -07:00
unix
net: unix: fix sending fds in multiple buffers
2009-09-11 11:31:45 -07:00
wanrouter
headers: smp_lock.h redux
2009-07-12 12:22:34 -07:00
wimax
wimax: fix warning caused by not checking retval of rfkill_set_hw_state()
2009-06-11 11:12:48 -07:00
wireless
cfg80211: allow scanning on specified frequencies when using wext-compatibility
2009-09-09 11:25:27 -04:00
x25
headers: smp_lock.h redux
2009-07-12 12:22:34 -07:00
xfrm
net: file_operations should be const
2009-09-02 01:03:53 -07:00
compat.c
net/compat/wext: send different messages to compat tasks
2009-07-15 08:53:39 -07:00
Kconfig
net/compat/wext: send different messages to compat tasks
2009-07-15 08:53:39 -07:00
Makefile
net: remove redundant sched/ in net/Makefile
2009-07-12 20:11:14 -07:00
nonet.c
socket.c
Make sock_sendpage() use kernel_sendpage()
2009-08-13 10:57:26 -07:00
sysctl_net.c
net: sysctl_net - use net_eq to compare nets
2009-03-16 16:23:30 +01:00
TUNABLE