Re: 2.6.27-rc7-sha1: EIP at proc_sys_compare+0x36/0x50

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Eric W. Biederman
Date: Sunday, September 28, 2008 - 8:05 pm

Linus Torvalds <torvalds@linux-foundation.org> writes:


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" <ebiederm@xmission.com>

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
2.6.27-rc7-sha1: EIP at proc_sys_compare+0x36/0x50, Alexey Dobriyan, (Fri Sep 26, 8:20 am)
Re: 2.6.27-rc7-sha1: EIP at proc_sys_compare+0x36/0x50, Linus Torvalds, (Fri Sep 26, 8:47 am)
Re: 2.6.27-rc7-sha1: EIP at proc_sys_compare+0x36/0x50, Eric W. Biederman, (Sat Sep 27, 1:44 am)
Re: 2.6.27-rc7-sha1: EIP at proc_sys_compare+0x36/0x50, Hugh Dickins, (Sun Sep 28, 12:28 pm)
Re: 2.6.27-rc7-sha1: EIP at proc_sys_compare+0x36/0x50, Linus Torvalds, (Sun Sep 28, 1:38 pm)
Re: 2.6.27-rc7-sha1: EIP at proc_sys_compare+0x36/0x50, Linus Torvalds, (Sun Sep 28, 1:46 pm)
Re: 2.6.27-rc7-sha1: EIP at proc_sys_compare+0x36/0x50, Linus Torvalds, (Sun Sep 28, 1:50 pm)
Re: 2.6.27-rc7-sha1: EIP at proc_sys_compare+0x36/0x50, Linus Torvalds, (Sun Sep 28, 1:55 pm)
Re: 2.6.27-rc7-sha1: EIP at proc_sys_compare+0x36/0x50, Linus Torvalds, (Sun Sep 28, 1:59 pm)
Re: 2.6.27-rc7-sha1: EIP at proc_sys_compare+0x36/0x50, Hugh Dickins, (Sun Sep 28, 3:07 pm)
Re: 2.6.27-rc7-sha1: EIP at proc_sys_compare+0x36/0x50, Eric W. Biederman, (Sun Sep 28, 8:05 pm)