summaryrefslogtreecommitdiffstats
path: root/net/sunrpc/auth.c
diff options
context:
space:
mode:
authorNeilBrown2014-08-04 08:24:00 +0200
committerTrond Myklebust2014-08-04 15:22:08 +0200
commit50d77739fa1972030daf1c8902404551e49bf232 (patch)
tree2e88b257ab14a66d790f5741137269965e06c444 /net/sunrpc/auth.c
parentNFS: allow lockless access to access_cache (diff)
downloadkernel-qcow2-linux-50d77739fa1972030daf1c8902404551e49bf232.tar.gz
kernel-qcow2-linux-50d77739fa1972030daf1c8902404551e49bf232.tar.xz
kernel-qcow2-linux-50d77739fa1972030daf1c8902404551e49bf232.zip
NFS: fix two problems in lookup_revalidate in RCU-walk
1/ rcu_dereference isn't correct: that field isn't RCU protected. It could potentially change at any time so ACCESS_ONCE might be justified. changes to ->d_parent are protected by ->d_seq. However that isn't always checked after ->d_revalidate is called, so it is safest to keep the double-check that ->d_parent hasn't changed at the end of these functions. 2/ in nfs4_lookup_revalidate, "->d_parent" was forgotten. So 'parent' was not the parent of 'dentry'. This fails safe is the context is that dentry->d_inode is NULL, and the result of parent->d_inode being NULL is that ECHILD is returned, which is always safe. Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'net/sunrpc/auth.c')
0 files changed, 0 insertions, 0 deletions