lkml.org 
[lkml]   [2008]   [Jan]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Bluez-devel] Oops involving RFCOMM and sysfs
On Sun, Jan 06, 2008 at 11:07:52AM +0900, Tejun Heo wrote:

> Right, I haven't thought about that. When sysfs_get_dentry() is called,
> @sd is always valid so unless there was existing negative dentry, lookup
> is guaranteed to return positive dentry, but by populating dcache with
> negative dentry before a node is created, things can go wrong. I don't
> think that's what's going on here tho. If that was the case, the
> while() loop looking up the next sd to lookup (@cur) should have blown
> up as negative dentry will have NULL d_fsdata which doesn't match any sd.

No. What happens if sd gets unlinked while we are on the way to
sysfs_get_dentry() and so does its parent? The parent is off the
sibling list, we get negative dentry from lookup. It's not hashed,
so won't stick around in dcache (which is apparently what you are
thinking about). However, _THIS_ lookup has returned you a dentry
with NULL ->d_inode and you are well and truly buggered.


\
 
 \ /
  Last update: 2008-01-06 03:21    [W:0.089 / U:0.400 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site