linux/net/core
Krishna Kumar e93737b0f0 net: Handle NETREG_UNINITIALIZED devices correctly
Fix two problems:

1. If unregister_netdevice_many() is called with both registered
   and unregistered devices, rollback_registered_many() bails out
   when it reaches the first unregistered device. The processing
   of the prior registered devices is unfinished, and the
   remaining devices are skipped, and possible registered netdev's
   are leaked/unregistered.

2. System hangs or panics depending on how the devices are passed,
   since when netdev_run_todo() runs, some devices were not fully
   processed.

Tested by passing intermingled unregistered and registered vlan
devices to unregister_netdevice_many() as follows:
	1. dev, fake_dev1, fake_dev2: hangs in run_todo
	   ("unregister_netdevice: waiting for eth1.100 to become
	    free. Usage count = 1")
	2. fake_dev1, dev, fake_dev2: failure during de-registration
	   and next registration, followed by a vlan driver Oops
	   during subsequent registration.

Confirmed that the patch fixes both cases.

Signed-off-by: Krishna Kumar <krkumar2@in.ibm.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-11 15:11:45 -08:00
..
datagram.c Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2009-11-06 00:55:55 -08:00
dev_mcast.c
dev.c net: Handle NETREG_UNINITIALIZED devices correctly 2009-12-11 15:11:45 -08:00
drop_monitor.c net: Replace old style lock initializer 2009-11-07 00:46:34 -08:00
dst.c
ethtool.c ethtool: Add reset operation 2009-10-07 01:10:44 -07:00
fib_rules.c net: Allow fib_rule_unregister to batch 2009-12-03 12:22:55 -08:00
filter.c filter: Add SKF_AD_QUEUE instruction 2009-10-20 01:06:22 -07:00
flow.c
gen_estimator.c
gen_stats.c pkt_sched: gen_estimator: Dont report fake rate estimators 2009-10-07 01:07:42 -07:00
iovec.c
kmap_skb.h
link_watch.c linkwatch: linkwatch_forget_dev() to speedup device dismantle 2009-11-18 05:03:11 -08:00
Makefile skbuff: remove skb_dma_map/unmap 2009-12-02 19:57:15 -08:00
neighbour.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6 2009-12-08 07:55:01 -08:00
net_namespace.c netns: Add an explicit rcu_barrier to unregister_pernet_{device|subsys} 2009-12-03 12:22:03 -08:00
net-sysfs.c net: use net_eq to compare nets 2009-11-25 15:14:13 -08:00
net-sysfs.h
net-traces.c
netevent.c
netpoll.c
pktgen.c net: Move && and || to end of previous line 2009-11-29 16:55:45 -08:00
request_sock.c
rtnetlink.c net: Support specifying the network namespace upon device creation. 2009-11-08 00:53:51 -08:00
scm.c
skbuff.c net: rename skb->iif to skb->skb_iif 2009-11-20 15:35:04 -08:00
sock.c net: Fix build warning in sock_bindtodevice(). 2009-11-05 22:37:11 -08:00
stream.c
sysctl_net_core.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6 2009-12-08 07:55:01 -08:00
user_dma.c
utils.c