diff options
author | Al Viro <viro@ZenIV.linux.org.uk> | 2011-11-07 21:21:26 +0000 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-11-07 14:58:06 -0800 |
commit | a3fbbde70a0cec017f2431e8f8de208708c76acc (patch) | |
tree | f584856e638ca916a8aca32eda58a8fe89722c9f /scripts/package | |
parent | 54a0f91301950af3d6ae2ff2bf710c9c68a9bfea (diff) | |
download | linux-stable-a3fbbde70a0cec017f2431e8f8de208708c76acc.tar.gz linux-stable-a3fbbde70a0cec017f2431e8f8de208708c76acc.tar.bz2 linux-stable-a3fbbde70a0cec017f2431e8f8de208708c76acc.zip |
VFS: we need to set LOOKUP_JUMPED on mountpoint crossing
Mountpoint crossing is similar to following procfs symlinks - we do
not get ->d_revalidate() called for dentry we have arrived at, with
unpleasant consequences for NFS4.
Simple way to reproduce the problem in mainline:
cat >/tmp/a.c <<'EOF'
#include <unistd.h>
#include <fcntl.h>
#include <stdio.h>
main()
{
struct flock fl = {.l_type = F_RDLCK, .l_whence = SEEK_SET, .l_len = 1};
if (fcntl(0, F_SETLK, &fl))
perror("setlk");
}
EOF
cc /tmp/a.c -o /tmp/test
then on nfs4:
mount --bind file1 file2
/tmp/test < file1 # ok
/tmp/test < file2 # spews "setlk: No locks available"...
What happens is the missing call of ->d_revalidate() after mountpoint
crossing and that's where NFS4 would issue OPEN request to server.
The fix is simple - treat mountpoint crossing the same way we deal with
following procfs-style symlinks. I.e. set LOOKUP_JUMPED...
Cc: stable@kernel.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts/package')
0 files changed, 0 insertions, 0 deletions