netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: xemul@openvz.org
Cc: netdev@vger.kernel.org, devel@openvz.org
Subject: Re: [PATCH 3/3] Fix race in ipv6_flowlabel_opt() when inserting two labels
Date: Thu, 18 Oct 2007 05:19:19 -0700 (PDT)	[thread overview]
Message-ID: <20071018.051919.07619008.davem@davemloft.net> (raw)
In-Reply-To: <47174A92.4090701@openvz.org>

From: Pavel Emelyanov <xemul@openvz.org>
Date: Thu, 18 Oct 2007 15:59:14 +0400

> In the IPV6_FL_A_GET case the hash is checked for flowlabels
> with the given label. If it is not found, the lock, protecting 
> the hash, is dropped to be re-get for writing. After this a
> newly allocated entry is inserted, but no checks are performed
> to catch a classical SMP race, when the conflicting label may 
> be inserted on another cpu.
> 
> Use the (currently unused) return value from fl_intern() to
> return the conflicting entry (if found) and re-check, whether
> we can reuse it (IPV6_FL_F_EXCL) or return -EEXISTS.
> 
> Also add the comment, about why not re-lookup the current
> sock for conflicting flowlabel entry.
> 
> Signed-off-by: Pavel Emelyanov <xemul@openvz.org>

Applied.

      reply	other threads:[~2007-10-18 12:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-18 11:59 [PATCH 3/3] Fix race in ipv6_flowlabel_opt() when inserting two labels Pavel Emelyanov
2007-10-18 12:19 ` 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=20071018.051919.07619008.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=devel@openvz.org \
    --cc=netdev@vger.kernel.org \
    --cc=xemul@openvz.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).