]> git.baikalelectronics.ru Git - kernel.git/commit
net: dev_close() should check IFF_UP
authorEric Dumazet <eric.dumazet@gmail.com>
Tue, 10 May 2011 19:26:06 +0000 (12:26 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 10 May 2011 22:03:33 +0000 (15:03 -0700)
commitb8847f747c8c8e67afb9eed40bba710e478a8302
treea60c2f9924511dec1389f0078144a2d7a045559e
parentb156e862518801fc86c1e3ee3faf90543bf7417c
net: dev_close() should check IFF_UP

Commit 6d4f0823e18b (factorize sync-rcu call in
unregister_netdevice_many) mistakenly removed one test from dev_close()

Following actions trigger a BUG :

modprobe bonding
modprobe dummy
ifconfig bond0 up
ifenslave bond0 dummy0
rmmod dummy

dev_close() must not close a non IFF_UP device.

With help from Frank Blaschka and Einar EL Lueck

Reported-by: Frank Blaschka <blaschka@linux.vnet.ibm.com>
Reported-by: Einar EL Lueck <ELELUECK@de.ibm.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/dev.c