summaryrefslogtreecommitdiffstats
path: root/mm/slab.c
diff options
context:
space:
mode:
authorNick Piggin2011-01-07 07:49:16 +0100
committerNick Piggin2011-01-07 07:50:16 +0100
commit786a5e15b613a9cee4fc9139fc3113a5ab0fde79 (patch)
tree0c0100945f74ad1d68b9b546e1929cfcb67e9095 /mm/slab.c
parentRevert "fs: use RCU read side protection in d_validate" (diff)
downloadkernel-qcow2-linux-786a5e15b613a9cee4fc9139fc3113a5ab0fde79.tar.gz
kernel-qcow2-linux-786a5e15b613a9cee4fc9139fc3113a5ab0fde79.tar.xz
kernel-qcow2-linux-786a5e15b613a9cee4fc9139fc3113a5ab0fde79.zip
fs: d_validate fixes
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@kernel.dk>
Diffstat (limited to 'mm/slab.c')
0 files changed, 0 insertions, 0 deletions