]> git.baikalelectronics.ru Git - kernel.git/commit
Merge branch 'netdev_unregister_races'
authorDavid S. Miller <davem@davemloft.net>
Sat, 11 Jul 2015 01:16:37 +0000 (18:16 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 11 Jul 2015 01:16:37 +0000 (18:16 -0700)
commitd160bef81e90fa86363b3f728f8bd2e86a1cbe23
tree8868fe137839c66fcef2a435d8d1b38fd0cd7533
parent12870423aaba3eb9dfbc0ea2b6d678c4766a0a6e
parent4b80a08a373c258867272017d27ef5ec6ce5fb5a
Merge branch 'netdev_unregister_races'

Julian Anastasov says:

====================
net: fixes for device unregistration

Test script from Eric W. Biederman can catch a problem
where packets from backlog are processed long after the last
synchronize_net call. This can be reproduced after few tests
if commit 977ac369b16f ("ipv4: Avoid crashing in ip_error")
is reverted for the test. Incoming packets do not hold
reference to device but even if they do, subsystems do not
expect packets to fly during and after the NETDEV_UNREGISTER
event.

The first fix has the cost of netif_running check in fast path.
The second fix calls rcu_read_lock while local IRQ is disabled,
I hope this is not against the rules.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>