[lkml]   [2008]   [Sep]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: 2.6.27-rc7-sha1: EIP at proc_sys_compare+0x36/0x50
Linus Torvalds <> writes:

> I actually like my second patch better - it looks simpler, and it means
> that the rules for filesystems using d_compare() are a bit clearer: at
> least we'll only pass them dentries to look at that haven't gone through
> d_drop (and we do hold dentry->d_lock that serializes all of that).
> So here it is again (I sent it out just minutes ago, but you weren't on
> that cc, you must have picked this up off the kernel list)
> NOTE! Totally untested patch! It looks sane and really obvious, but maybe
> it has some insane and non-obvious bug.

We definitely have a race between d_kill setting dentry->d_inode = NULL
and proc_sys_compare reading d_inode.

We don't generate negative dentries for /proc/sys.

In dput atomic_dec_and_lock takes the lock before setting the count to 0.
So there is no race there.

Testing for d_unhashed and getting us out of rcu limbo before calling
into the filesystem methods makes the reasoning a lot clearer.

Looks good to me.

Reviewed-by: "Eric W. Biederman" <>

 \ /
  Last update: 2008-09-29 05:07    [W:0.048 / U:0.712 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site