netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sowmini Varadhan <sowmini.varadhan@oracle.com>
To: Julian Anastasov <ja@ssi.bg>
Cc: netdev@vger.kernel.org, davem@davemloft.net, stephen@networkplumber.org
Subject: Re: [PATCH V3] neigh: Really delete an arp/neigh entry on "ip neigh delete" or "arp -d"
Date: Wed, 31 May 2017 21:21:04 -0400	[thread overview]
Message-ID: <20170601012104.GA23011@oracle.com> (raw)
In-Reply-To: <alpine.LFD.2.20.1706010059370.10214@ja.home.ssi.bg>

On (06/01/17 01:41), Julian Anastasov wrote:
> 	Another problem is that neigh_update() changes the
> state but before we go and unlink the entry another CPU
> can reactivate the entry, i.e. NUD_INCOMPLETE entered
> in __neigh_event_send(). So, there will be always some
> small window where surprises can happen and the entry is
> not really deleted.

but that would be ok- it's the same as if I did
   arp -d <addr>
   ping <addr>

I think the only danger is that, once we drop the ref with
neigh_release(), we are relying on the table's lock for the neigh
to not disappear under us. Thus as you correctly pointed out,
we need the tbl->lock to make sure we sync with all paths that
can pull the neigh out of the table (and release the table's ref
along the way).

Thanks for catching that, patch v4 (with correct smtp timestamp!)
will be sent out shortly.

--Sowmini

  reply	other threads:[~2017-06-01  1:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-30 23:52 [PATCH V3] neigh: Really delete an arp/neigh entry on "ip neigh delete" or "arp -d" Sowmini Varadhan
2017-05-31 21:41 ` Julian Anastasov
2017-05-31 21:46   ` Sowmini Varadhan
2017-05-31 22:41     ` Julian Anastasov
2017-06-01  1:21       ` Sowmini Varadhan [this message]
2017-05-31 22:07   ` Sowmini Varadhan
2017-05-31 23:26 ` 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=20170601012104.GA23011@oracle.com \
    --to=sowmini.varadhan@oracle.com \
    --cc=davem@davemloft.net \
    --cc=ja@ssi.bg \
    --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).