From: David Miller <davem@davemloft.net>
To: ja@ssi.bg
Cc: netdev@vger.kernel.org, eric.dumazet@gmail.com,
ying.xue@windriver.com, alexei@purestorage.com,
joern@purestorage.com
Subject: Re: [PATCH RFC net] neigh: do not modify unlinked entries
Date: Sun, 21 Jun 2015 09:43:58 -0700 (PDT) [thread overview]
Message-ID: <20150621.094358.971978257754152032.davem@davemloft.net> (raw)
In-Reply-To: <1434484599-5875-1-git-send-email-ja@ssi.bg>
From: Julian Anastasov <ja@ssi.bg>
Date: Tue, 16 Jun 2015 22:56:39 +0300
> The lockless lookups can return entry that is unlinked.
> Sometimes they get reference before last neigh_cleanup_and_release,
> sometimes they do not need reference. Later, any
> modification attempts may result in the following problems:
>
> 1. entry is not destroyed immediately because neigh_update
> can start the timer for dead entry, eg. on change to NUD_REACHABLE
> state. As result, entry lives for some time but is invisible
> and out of control.
>
> 2. __neigh_event_send can run in parallel with neigh_destroy
> while refcnt=0 but if timer is started and expired refcnt can
> reach 0 for second time leading to second neigh_destroy and
> possible crash.
>
> Thanks to Eric Dumazet and Ying Xue for their work and analyze
> on the __neigh_event_send change.
>
> Fixes: 767e97e1e0db ("neigh: RCU conversion of struct neighbour")
> Fixes: a263b3093641 ("ipv4: Make neigh lookups directly in output packet path.")
> Fixes: 6fd6ce2056de ("ipv6: Do not depend on rt->n in ip6_finish_output2().")
> Cc: Eric Dumazet <eric.dumazet@gmail.com>
> Cc: Ying Xue <ying.xue@windriver.com>
> Signed-off-by: Julian Anastasov <ja@ssi.bg>
Applied and queued up for -stable, thanks!
prev parent reply other threads:[~2015-06-21 16:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-16 19:56 [PATCH RFC net] neigh: do not modify unlinked entries Julian Anastasov
2015-06-19 6:40 ` Eric Dumazet
2015-06-19 7:14 ` YOSHIFUJI Hideaki/吉藤英明
2015-06-19 8:24 ` Julian Anastasov
2015-06-21 16:43 ` David Miller [this message]
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=20150621.094358.971978257754152032.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=alexei@purestorage.com \
--cc=eric.dumazet@gmail.com \
--cc=ja@ssi.bg \
--cc=joern@purestorage.com \
--cc=netdev@vger.kernel.org \
--cc=ying.xue@windriver.com \
/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).