aboutsummaryrefslogtreecommitdiffstats
path: root/lib/xarray.c
diff options
context:
space:
mode:
authorAl Viro <[email protected]>2019-11-03 18:55:43 +0000
committerAl Viro <[email protected]>2019-11-10 16:57:45 +0000
commit762c69685ff7ad5ad7fee0656671e20a0c9c864d (patch)
tree9dd2bdbab0f29a6ed9014f56db9ec384c327a282 /lib/xarray.c
parentecryptfs_lookup_interpose(): lower_dentry->d_inode is not stable (diff)
downloadkernel-762c69685ff7ad5ad7fee0656671e20a0c9c864d.tar.gz
kernel-762c69685ff7ad5ad7fee0656671e20a0c9c864d.zip
ecryptfs_lookup_interpose(): lower_dentry->d_parent is not stable either
We need to get the underlying dentry of parent; sure, absent the races it is the parent of underlying dentry, but there's nothing to prevent losing a timeslice to preemtion in the middle of evaluation of lower_dentry->d_parent->d_inode, having another process move lower_dentry around and have its (ex)parent not pinned anymore and freed on memory pressure. Then we regain CPU and try to fetch ->d_inode from memory that is freed by that point. dentry->d_parent *is* stable here - it's an argument of ->lookup() and we are guaranteed that it won't be moved anywhere until we feed it to d_add/d_splice_alias. So we safely go that way to get to its underlying dentry. Cc: [email protected] # since 2009 or so Signed-off-by: Al Viro <[email protected]>
Diffstat (limited to 'lib/xarray.c')
0 files changed, 0 insertions, 0 deletions