mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Andrey Konovalov <andreyknvl@google.com>
Cc: Ingo Molnar <mingo@kernel.org>, Will Deacon <will.deacon@arm.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Davidlohr Bueso <davidlohr@hp.com>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	Dmitry Vyukov <dvyukov@google.com>,
	Kostya Serebryany <kcc@google.com>,
	ktsan@googlegroups.com
Subject: Re: Potential data race in dput and __d_lookup
Date: Thu, 20 Nov 2014 18:05:03 +0000	[thread overview]
Message-ID: <20141120180503.GN7996@ZenIV.linux.org.uk> (raw)
In-Reply-To: <CAAeHK+zQZ=sJYQA=BKLS2i7hu8NyXn6GXngvDqG9WD96yd9acg@mail.gmail.com>

On Thu, Nov 20, 2014 at 09:20:14PM +0400, Andrey Konovalov wrote:

> It seems that one thread increments 'dentry->d_lockref.count', while
> other does 'lockref_put_or_lock(&dentry->d_lockref)'  without any
> synchronization.
> 
> Could you confirm if this is a real race?

I can not.  Increment in __d_lookup() is under ->d_lockref.lock (aka
->d_lock) and lockref_put_or_lock() is atomic wrt that.

      parent reply	other threads:[~2014-11-20 18:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-20 17:20 Andrey Konovalov
2014-11-20 17:41 ` Will Deacon
2014-11-20 18:11   ` Al Viro
2014-11-20 18:05 ` Al Viro [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=20141120180503.GN7996@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=andreyknvl@google.com \
    --cc=davidlohr@hp.com \
    --cc=dvyukov@google.com \
    --cc=kcc@google.com \
    --cc=ktsan@googlegroups.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=will.deacon@arm.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®