lkml.org 
[lkml]   [2003]   [Jun]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] First casuality of hlist poisoning in 2.5.70

On Wed, 11 Jun 2003, Trond Myklebust wrote:
>
> AFAICS one should not rehash the dentry until after the d_move(). Does
> that make sense?

Yeah, it does seem that rehashing before actually calling d_move() means
that there is a small window where another process might now come in, and
use the dcache (without getting the semaphore) to see the old value of the
target dentry, even though the low-level filesystem has already move the
new dentry value over the target. Ie the window would be between

i_op->rename(...)
d_rehash(new_dentry)
... race here ...
d_move(old_dentry, new_dentry)

That might confuse a filesystem that expected that the target was deleted
an no longer reachable by anybody.

Al? What do you think?

Linus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:36    [W:0.028 / U:0.364 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site