linux-sg2042/net
Johannes Berg b8273570f8 genetlink: fix netns vs. netlink table locking (2)
Similar to commit d136f1bd36,
there's a bug when unregistering a generic netlink family,
which is caught by the might_sleep() added in that commit:

    BUG: sleeping function called from invalid context at net/netlink/af_netlink.c:183
    in_atomic(): 1, irqs_disabled(): 0, pid: 1510, name: rmmod
    2 locks held by rmmod/1510:
     #0:  (genl_mutex){+.+.+.}, at: [<ffffffff8138283b>] genl_unregister_family+0x2b/0x130
     #1:  (rcu_read_lock){.+.+..}, at: [<ffffffff8138270c>] __genl_unregister_mc_group+0x1c/0x120
    Pid: 1510, comm: rmmod Not tainted 2.6.31-wl #444
    Call Trace:
     [<ffffffff81044ff9>] __might_sleep+0x119/0x150
     [<ffffffff81380501>] netlink_table_grab+0x21/0x100
     [<ffffffff813813a3>] netlink_clear_multicast_users+0x23/0x60
     [<ffffffff81382761>] __genl_unregister_mc_group+0x71/0x120
     [<ffffffff81382866>] genl_unregister_family+0x56/0x130
     [<ffffffffa0007d85>] nl80211_exit+0x15/0x20 [cfg80211]
     [<ffffffffa000005a>] cfg80211_exit+0x1a/0x40 [cfg80211]

Fix in the same way by grabbing the netlink table lock
before doing rcu_read_lock().

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-09-24 15:44:05 -07:00
..
9p virtio: add virtio IDs file 2009-09-23 22:26:32 +09:30
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 ax25: Fix SIOCAX25GETINFO ioctl 2009-09-22 14:00:14 -07:00
bluetooth Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid 2009-09-22 07:51:28 -07:00
bridge sysctl: remove "struct file *" argument of ->proc_handler 2009-09-24 07:21:04 -07:00
can can: fix NOHZ local_softirq_pending 08 warning 2009-09-15 01:31:34 -07:00
core pktgen: better scheduler friendliness 2009-09-24 15:38:50 -07:00
dcb dcbnl: Add implementations of dcbnl setapp/getapp commands 2009-09-01 01:24:36 -07:00
dccp mm: replace various uses of num_physpages by totalram_pages 2009-09-22 07:17:38 -07:00
decnet sysctl: remove "struct file *" argument of ->proc_handler 2009-09-24 07:21:04 -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 ieee802154: add locking for seq numbers 2009-09-15 18:25:16 +04:00
ipv4 tunnel: eliminate recursion field 2009-09-24 15:39:22 -07:00
ipv6 tunnel: eliminate recursion field 2009-09-24 15:39:22 -07:00
ipx headers: smp_lock.h redux 2009-07-12 12:22:34 -07:00
irda sysctl: remove "struct file *" argument of ->proc_handler 2009-09-24 07:21:04 -07:00
iucv af_iucv: fix race when queueing skbs on the backlog queue 2009-09-16 20:57:39 -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 mac80211: fix DTIM setting 2009-09-23 11:35:53 -04:00
netfilter sysctl: remove "struct file *" argument of ->proc_handler 2009-09-24 07:21:04 -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 (2) 2009-09-24 15:44:05 -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: error on broadcast sending (unimplemented) 2009-09-24 15:38:57 -07:00
rds Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2009-09-17 20:53:52 -07:00
rfkill rfkill: add the GPS radio type 2009-08-04 16:44:23 -04:00
rose net: constify remaining proto_ops 2009-09-14 17:03:09 -07:00
rxrpc trivial: fix typo "to to" in multiple files 2009-09-21 15:14:55 +02:00
sched trivial: fix typo "to to" in multiple files 2009-09-21 15:14:55 +02:00
sctp mm: replace various uses of num_physpages by totalram_pages 2009-09-22 07:17:38 -07:00
sunrpc net: fix htmldocs sunrpc, clnt.c 2009-09-24 15:39:14 -07: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 Merge branch 'master' of /home/davem/src/GIT/linux-2.6/ 2009-09-24 15:13:11 -07: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
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
TUNABLE
compat.c net/compat/wext: send different messages to compat tasks 2009-07-15 08:53:39 -07:00
nonet.c
socket.c Move magic numbers into magic.h 2009-09-23 07:39:28 -07:00
sysctl_net.c net: sysctl_net - use net_eq to compare nets 2009-03-16 16:23:30 +01:00