]> git.baikalelectronics.ru Git - kernel.git/commit
Fix nasty ncpfs symlink handling bug.
authorLinus Torvalds <torvalds@g5.osdl.org>
Sat, 20 Aug 2005 01:02:56 +0000 (18:02 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sat, 20 Aug 2005 01:02:56 +0000 (18:02 -0700)
commit7e33f27035af8f17b0cb10b248ff433c1384712f
tree8e38db1be28006894915273b3f3cb3beaa6efda3
parentc2288a076eb8dcd61a3b915474e4ade10c64c6dc
Fix nasty ncpfs symlink handling bug.

This bug could cause oopses and page state corruption, because ncpfs
used the generic page-cache symlink handlign functions.  But those
functions only work if the page cache is guaranteed to be "stable", ie a
page that was installed when the symlink walk was started has to still
be installed in the page cache at the end of the walk.

We could have fixed ncpfs to not use the generic helper routines, but it
is in many ways much cleaner to instead improve on the symlink walking
helper routines so that they don't require that absolute stability.

We do this by allowing "follow_link()" to return a error-pointer as a
cookie, which is fed back to the cleanup "put_link()" routine.  This
also simplifies NFS symlink handling.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/autofs/symlink.c
fs/cifs/cifsfs.h
fs/cifs/link.c
fs/ext2/symlink.c
fs/ext3/symlink.c
fs/namei.c
fs/nfs/symlink.c
fs/sysfs/symlink.c
include/linux/fs.h
mm/shmem.c