diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2014-06-12 06:29:13 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2014-06-12 06:29:13 +0200 |
commit | c2338f2dc7c1e9f6202f370c64ffd7f44f3d4b51 (patch) | |
tree | 54677cd1be2c934fea684a53e34f85d4c6f4981e /drivers/infiniband/hw/ocrdma/ocrdma_stats.c | |
parent | Merge commit '9f12600fe425bc28f0ccba034a77783c09c15af4' into for-linus (diff) | |
download | linux-c2338f2dc7c1e9f6202f370c64ffd7f44f3d4b51.tar.xz linux-c2338f2dc7c1e9f6202f370c64ffd7f44f3d4b51.zip |
lock_parent: don't step on stale ->d_parent of all-but-freed one
Dentry that had been through (or into) __dentry_kill() might be seen
by shrink_dentry_list(); that's normal, it'll be taken off the shrink
list and freed if __dentry_kill() has already finished. The problem
is, its ->d_parent might be pointing to already freed dentry, so
lock_parent() needs to be careful.
We need to check that dentry hasn't already gone into __dentry_kill()
*and* grab rcu_read_lock() before dropping ->d_lock - the latter makes
sure that whatever we see in ->d_parent after dropping ->d_lock it
won't be freed until we drop rcu_read_lock().
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/infiniband/hw/ocrdma/ocrdma_stats.c')
0 files changed, 0 insertions, 0 deletions