> This patch can't make any difference that I can see.
> At the point where you clear the f_dentry, the whole file pointer is
> completely local to the open routine (it hasn't been installed anywhere),
> so nobody else can have a pointer to it. As such, nobody else could
> dereference the field except for us (and we won't do that, because we're
> just about to destroy it).
The problem is that the filp is on the inuse list, and that list effectively
makes the filp public. There are a number of places where kernel routines
walk the inuse filp list and do things to the filps. For this to be safe,
the dentry pointer (if it's non-NULL) must be valid.
> It would indeed be a major bug to expose the file pointer before it is
> completely filled in, but that is regardless of whether we have a stale
> dentry pointer or any dentry at all..
The users of the inuse list are supposed to check for NULL f_dentry and
ignore it -- I posted a patch for the quota code to fix a missing test. But
we can't allow a stale dentry pointer ...
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to email@example.com
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html