Consistent with the fact that is new code.
Agreed.
Where is that?
This is an issue because if we can get negative dentries the other
dentry operations are wrong as well.n
We hold the directory mutex in real_lookup
before calling i_op->lookup. So lookups should be serialized.
proc_sys_lookup always either succeeds and calls d_add with
a valid inode or fails and returns an error code in which case
real_lookup puts the dentry before it is hashed.
We hold the directory mutex in readdir before calling
file->f_op->readdir. Deep inside of proc_sys_readdir
proc_sys_fill_cache only adds the dentry if it has an inode.
do_revalidate doesn't look like it could get us there.
Nor does any of the paths that call ->d_delete.
It looks like don't free the inode from an non-negative
dentry until after it is unhashed.
So I'm totally stumped as to how we can get there.
Clearly we don't have an inode there but I don't see we can end up with
a negative inode.
If we can't avoid negative dentries that looks appropriate.
But won't .d_revalidate and .d_delete be susceptible to the same
problem if we do have negative dentries?
Eric
--