From: Julian Anastasov <ja@ssi.bg>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org,
"Eric W. Biederman" <ebiederm@xmission.com>,
Stephen Hemminger <stephen@networkplumber.org>,
"Vittorio G (VittGam)" <linuxbugs@vittgam.net>
Subject: [PATCHv3 net 0/2] net: fixes for device unregistration
Date: Thu, 9 Jul 2015 09:59:08 +0300 [thread overview]
Message-ID: <1436425150-5612-1-git-send-email-ja@ssi.bg> (raw)
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
next reply other threads:[~2015-07-09 6:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-09 6:59 Julian Anastasov [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1436425150-5612-1-git-send-email-ja@ssi.bg \
--to=ja@ssi.bg \
--cc=davem@davemloft.net \
--cc=ebiederm@xmission.com \
--cc=linuxbugs@vittgam.net \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).