Re: [patch 01/28] fs: d_validate fixes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Nov 18, 2010 at 12:51:23PM -0800, David Miller wrote:
> From: Nick Piggin <npiggin@xxxxxxxxx>
> Date: Wed, 17 Nov 2010 01:09:01 +1100
> 
> > d_validate has been broken for a long time.
> > 
> > kmem_ptr_validate does not guarantee that a pointer can be dereferenced
> > if it can go away at any time. Even rcu_read_lock doesn't help, because
> > the pointer might be queued in RCU callbacks but not executed yet.
> > 
> > So the parent cannot be checked, nor the name hashed. The dentry pointer
> > can not be touched until it can be verified under lock. Hashing simply
> > cannot be used.
> > 
> > Instead, verify the parent/child relationship by traversing parent's
> > d_child list. It's slow, but only ncpfs and the destaged smbfs care
> > about it, at this point.
> > 
> > Signed-off-by: Nick Piggin <npiggin@xxxxxxxxx>
> 
> This won't apply because is conflicts with Christoph Hellwig's
> RCU conversion of d_validate().
> 
> Which is a change that went in more than a month ago.

Sorry yeah I had a local revert that I didn't send out, otherwise
it should be a vanilla upstream kernel.

 
> Thus I'd really appreciate if you mentioned what tree your patches are
> against in your "0/N" posting, always.

Try to remember. I'll put some time into polishing up a git tree
and submitting the more interesting patches as well, this weekend.

Thanks,
Nick
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux