diff options
author | Krishna Kumar | 2009-12-08 23:26:02 +0100 |
---|---|---|
committer | David S. Miller | 2009-12-12 00:11:45 +0100 |
commit | e93737b0f0159a61772894943199fd3b6f315641 (patch) | |
tree | feaa10bd2419f2a1bad89bcf4880bc8399339873 /arch/sh/drivers/pci/Kconfig | |
parent | can: add the driver for Analog Devices Blackfin on-chip CAN controllers (diff) | |
download | kernel-qcow2-linux-e93737b0f0159a61772894943199fd3b6f315641.tar.gz kernel-qcow2-linux-e93737b0f0159a61772894943199fd3b6f315641.tar.xz kernel-qcow2-linux-e93737b0f0159a61772894943199fd3b6f315641.zip |
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>
Diffstat (limited to 'arch/sh/drivers/pci/Kconfig')
0 files changed, 0 insertions, 0 deletions