netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Pravin B Shelar <pshelar@ovn.org>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net 1/2] vxlan: avoid using stale vxlan socket.
Date: Thu, 27 Oct 2016 16:02:19 -0700	[thread overview]
Message-ID: <20161027160219.06a946f4@xeon-e3> (raw)
In-Reply-To: <1477594316-118234-1-git-send-email-pshelar@ovn.org>

On Thu, 27 Oct 2016 11:51:55 -0700
Pravin B Shelar <pshelar@ovn.org> wrote:

> -	vxlan->vn4_sock = NULL;
> +	rcu_assign_pointer(vxlan->vn4_sock, NULL);
>  #if IS_ENABLED(CONFIG_IPV6)
> -	vxlan->vn6_sock = NULL;
> +	rcu_assign_pointer(vxlan->vn6_sock, NULL);
>  	if (ipv6 || metadata)

User RCU_INIT_POINTER when setting pointer to NULL.
It avoids unnecessary barrier.

  parent reply	other threads:[~2016-10-27 23:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-27 18:51 [PATCH net 1/2] vxlan: avoid using stale vxlan socket Pravin B Shelar
2016-10-27 18:51 ` [PATCH net 2/2] geneve: avoid using stale geneve socket Pravin B Shelar
2016-10-28 14:27   ` John W. Linville
2016-10-28 17:01     ` Pravin Shelar
2016-10-27 23:02 ` Stephen Hemminger [this message]
2016-10-28 16:59   ` [PATCH net 1/2] vxlan: avoid using stale vxlan socket Pravin Shelar

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=20161027160219.06a946f4@xeon-e3 \
    --to=stephen@networkplumber.org \
    --cc=netdev@vger.kernel.org \
    --cc=pshelar@ovn.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).