mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Dmitry Vyukov <dvyukov@google.com>
Cc: davem@davemloft.net, edumazet@google.com,
	alexander.h.duyck@redhat.com, jiri@resnulli.us,
	hannes@stressinduktion.org, linus.luessing@c0d3.blue,
	willemb@google.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, andreyknvl@google.com,
	kcc@google.com, glider@google.com, paulmck@linux.vnet.ibm.com,
	hboehm@google.com
Subject: Re: [RFC] net: fix data race on sk_buff after re-cloning
Date: Thu, 17 Sep 2015 12:03:14 -0700	[thread overview]
Message-ID: <1442516594.7946.2.camel@edumazet-glaptop2.roam.corp.google.com> (raw)
In-Reply-To: <1442515456-12390-1-git-send-email-dvyukov@google.com>

On Thu, 2015-09-17 at 20:44 +0200, Dmitry Vyukov wrote:
> KernelThreadSanitizer (KTSAN) reported the following race (on 4.2 rc2):
> 
> ThreadSanitizer: data-race in __copy_skb_header
...

> 	if (likely(atomic_read(&skb->users) == 1))
> 		smp_rmb();
> 
> The patch contains a proposed fix.
> If it looks good to you and the scenario looks sane,
> then I will update the description and resend it.
> ---
>  net/core/skbuff.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)

I have to double check this patch, but in the case it is needed,
it would be better to not use fancy new atomic_read_acquire(),
as backporting the fix up to 3.19 (where the bug was probably added)
will require extra hassle.

atomic_read_acquire() would be fine for cleanups and new code, in next
branch.

Thanks !



      parent reply	other threads:[~2015-09-17 19:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-17 18:44 Dmitry Vyukov
2015-09-17 18:46 ` Dmitry Vyukov
2015-09-17 19:03 ` Eric Dumazet [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=1442516594.7946.2.camel@edumazet-glaptop2.roam.corp.google.com \
    --to=eric.dumazet@gmail.com \
    --cc=alexander.h.duyck@redhat.com \
    --cc=andreyknvl@google.com \
    --cc=davem@davemloft.net \
    --cc=dvyukov@google.com \
    --cc=edumazet@google.com \
    --cc=glider@google.com \
    --cc=hannes@stressinduktion.org \
    --cc=hboehm@google.com \
    --cc=jiri@resnulli.us \
    --cc=kcc@google.com \
    --cc=linus.luessing@c0d3.blue \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=willemb@google.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

all inboxes | Powered by JetHome®