lkml.org 
[lkml]   [2014]   [Nov]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Potential data race in dput and __d_lookup
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.


\
 
 \ /
  Last update: 2014-11-20 19:41    [W:0.040 / U:0.436 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site