netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHv3 net 0/2] net: fixes for device unregistration
@ 2015-07-09  6:59 Julian Anastasov
  2015-07-09  6:59 ` [PATCHv3 net 1/2] net: do not process device backlog during unregistration Julian Anastasov
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Julian Anastasov @ 2015-07-09  6:59 UTC (permalink / raw)
  To: David Miller
  Cc: netdev, Eric W. Biederman, Stephen Hemminger,
	Vittorio G (VittGam)

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 381c759d9916 ("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.

Julian Anastasov (2):
  net: do not process device backlog during unregistration
  net: call rcu_read_lock early in process_backlog

 net/core/dev.c | 38 ++++++++++++++++++++------------------
 1 file changed, 20 insertions(+), 18 deletions(-)

-- 
1.9.3

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-07-11  6:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-09  6:59 [PATCHv3 net 0/2] net: fixes for device unregistration Julian Anastasov
2015-07-09  6:59 ` [PATCHv3 net 1/2] net: do not process device backlog during unregistration Julian Anastasov
2015-07-09  6:59 ` [PATCHv3 net 2/2] net: call rcu_read_lock early in process_backlog Julian Anastasov
2015-07-11  1:17 ` [PATCHv3 net 0/2] net: fixes for device unregistration David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).