Re: [PATCH] sysfs_remove_dir Vs dcache_readdir race fix

From: viro
Date: Thu Nov 20 2003 - 13:45:50 EST


On Thu, Nov 20, 2003 at 07:17:09AM -0800, Andrew Morton wrote:

> Seems to me that the libfs code is fragile.
>
> What happens if the dentry at filp->f_private_data gets moved to a
> different directory after someone did dcache_dir_open()? Does the loop
> in dcache_readdir() go infinite again?

Can't happen - it's not hashed and not attached to any inode. IOW, there's
no way to find that animal, let alone pass it to d_move().
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/