]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
fix sysvfs symlinks
authorAl Viro <viro@zeniv.linux.org.uk>
Tue, 24 Nov 2015 02:11:08 +0000 (21:11 -0500)
committerWilly Tarreau <w@1wt.eu>
Fri, 29 Jan 2016 21:12:45 +0000 (22:12 +0100)
commit54146dba78db0ee7ff31cb8311c78aebfd21c2ba
tree749b0b3e797df0051e7141e9842b0f5d1ba3608a
parentde743b3d3670be21ab126559ae6734c02be99756
fix sysvfs symlinks

commit 0ebf7f10d67a70e120f365018f1c5fce9ddc567d upstream.

The thing got broken back in 2002 - sysvfs does *not* have inline
symlinks; even short ones have bodies stored in the first block
of file.  sysv_symlink() handles that correctly; unfortunately,
attempting to look an existing symlink up will end up confusing
them for inline symlinks, and interpret the block number containing
the body as the body itself.

Nobody has noticed until now, which says something about the level
of testing sysvfs gets ;-/

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
[bwh: Backported to 3.2:
 - Adjust context
 - Also delete unused sysv_fast_symlink_inode_operations]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
(cherry picked from commit 081c769778f7a41f4eb3d633df26ad572575c980)
Signed-off-by: Willy Tarreau <w@1wt.eu>
fs/sysv/Makefile
fs/sysv/inode.c
fs/sysv/symlink.c [deleted file]