[PATCH] namei fixes (15/19)
Al Viro authored

Getting rid of sloppy logics:

a) in do_follow_link() we have the wrong vfsmount dropped if our symlink
had been mounted on something.  Currently it worls only because we never
get such situation (modulo filesystem playing dirty tricks on us).  And
it obfuscates already convoluted logics...

b) same goes for open_namei().

c) in __link_path_walk() we have another "it should never happen" sloppiness -
out_dput: there does double-free on underlying vfsmount and leaks the covering
one if we hit it just after crossing a mountpoint.  Again, wrong vfsmount
getting dropped.

d) another too-early-mntput() race - in do_follow_mount() we need to postpone
conditional mntput(path->mnt) until after dput(path->dentry).  Again, this one
happens only in it-currently-never-happens-unless-some-fs-plays-dirty
scenario...
Signed-off-by: default avatarAl Viro <viro@parcelfarce.linux.theplanet.co.uk>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
d9d29a29
Name Last commit Last update
..
adfs Linux-2.6.12-rc2
affs Linux-2.6.12-rc2
afs [PATCH] Exterminate PAGE_BUG
autofs Linux-2.6.12-rc2
autofs4 [PATCH] autofs4: tree race fix
befs Linux-2.6.12-rc2
bfs Linux-2.6.12-rc2
cifs [CIFS] fix casts of unicode strings to match function definition
coda Linux-2.6.12-rc2
cramfs Linux-2.6.12-rc2
debugfs Linux-2.6.12-rc2
devfs Linux-2.6.12-rc2
devpts Linux-2.6.12-rc2
efs Linux-2.6.12-rc2
exportfs Linux-2.6.12-rc2
ext2 [PATCH] ext2 corruption - regression between 2.6.9 and 2.6.10
ext3 [PATCH] Avoid console spam with ext3 aborted journal.
fat Linux-2.6.12-rc2
freevxfs Linux-2.6.12-rc2
hfs [PATCH] hfs, hfsplus: don't leak s_fs_info and fix an oops
hfsplus [PATCH] hfs, hfsplus: don't leak s_fs_info and fix an oops
hostfs [PATCH] uml: remove 2_5compat.h
hpfs Linux-2.6.12-rc2
hppfs Linux-2.6.12-rc2
hugetlbfs Linux-2.6.12-rc2
isofs
jbd
jffs
jffs2
jfs
lockd
minix
msdos
ncpfs
nfs
nfsd
nls
ntfs
openpromfs
partitions
proc
qnx4
ramfs
reiserfs
romfs
smbfs
sysfs
sysv
udf
ufs
umsdos
vfat
xfs
Kconfig
Kconfig.binfmt
Makefile
aio.c
attr.c
bad_inode.c
binfmt_aout.c
binfmt_elf.c
binfmt_elf_fdpic.c
binfmt_em86.c
binfmt_flat.c
binfmt_misc.c
binfmt_script.c
binfmt_som.c
bio.c
block_dev.c
buffer.c
char_dev.c
compat.c
compat_ioctl.c
dcache.c
dcookies.c
direct-io.c
dnotify.c
dquot.c
eventpoll.c
exec.c
fcntl.c
fifo.c
file.c
file_table.c
filesystems.c
fs-writeback.c
inode.c
ioctl.c
libfs.c
locks.c
mbcache.c
mpage.c
namei.c
namespace.c
nfsctl.c
open.c
pipe.c
posix_acl.c
quota.c
quota_v1.c
quota_v2.c
read_write.c
readdir.c
select.c
seq_file.c
stat.c
super.c
xattr.c
xattr_acl.c