summaryrefslogtreecommitdiffstats
path: root/fs/proc/base.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2009-12-23 05:45:11 +0100
committerAl Viro <viro@zeniv.linux.org.uk>2010-01-14 15:05:25 +0100
commit86acdca1b63e6890540fa19495cfc708beff3d8b (patch)
treef589566363ef4f77098eba9ced48325f410168e6 /fs/proc/base.c
parentMerge branch 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/air... (diff)
downloadlinux-86acdca1b63e6890540fa19495cfc708beff3d8b.tar.xz
linux-86acdca1b63e6890540fa19495cfc708beff3d8b.zip
fix autofs/afs/etc. magic mountpoint breakage
We end up trying to kfree() nd.last.name on open("/mnt/tmp", O_CREAT) if /mnt/tmp is an autofs direct mount. The reason is that nd.last_type is bogus here; we want LAST_BIND for everything of that kind and we get LAST_NORM left over from finding parent directory. So make sure that it *is* set properly; set to LAST_BIND before doing ->follow_link() - for normal symlinks it will be changed by __vfs_follow_link() and everything else needs it set that way. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to '')
-rw-r--r--fs/proc/base.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c
index 18d5cc62d8ed..e42bbd843ed1 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -1419,7 +1419,6 @@ static void *proc_pid_follow_link(struct dentry *dentry, struct nameidata *nd)
goto out;
error = PROC_I(inode)->op.proc_get_link(inode, &nd->path);
- nd->last_type = LAST_BIND;
out:
return ERR_PTR(error);
}