From 773112f7911382e925a5062884bc6f542182df67 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Sat, 13 Feb 2016 17:57:22 -0800 Subject: [PATCH] 3.14-stable patches added patches: fix-sysvfs-symlinks.patch --- queue-3.14/fix-sysvfs-symlinks.patch | 45 ++++++++++++++++++++++++++++ queue-3.14/series | 1 + 2 files changed, 46 insertions(+) create mode 100644 queue-3.14/fix-sysvfs-symlinks.patch diff --git a/queue-3.14/fix-sysvfs-symlinks.patch b/queue-3.14/fix-sysvfs-symlinks.patch new file mode 100644 index 00000000000..32a21bbc464 --- /dev/null +++ b/queue-3.14/fix-sysvfs-symlinks.patch @@ -0,0 +1,45 @@ +From 0ebf7f10d67a70e120f365018f1c5fce9ddc567d Mon Sep 17 00:00:00 2001 +From: Al Viro +Date: Mon, 23 Nov 2015 21:11:08 -0500 +Subject: fix sysvfs symlinks + +From: Al Viro + +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 +Signed-off-by: Greg Kroah-Hartman + +--- + fs/sysv/inode.c | 10 ++-------- + 1 file changed, 2 insertions(+), 8 deletions(-) + +--- a/fs/sysv/inode.c ++++ b/fs/sysv/inode.c +@@ -161,14 +161,8 @@ void sysv_set_inode(struct inode *inode, + inode->i_fop = &sysv_dir_operations; + inode->i_mapping->a_ops = &sysv_aops; + } else if (S_ISLNK(inode->i_mode)) { +- if (inode->i_blocks) { +- inode->i_op = &sysv_symlink_inode_operations; +- inode->i_mapping->a_ops = &sysv_aops; +- } else { +- inode->i_op = &sysv_fast_symlink_inode_operations; +- nd_terminate_link(SYSV_I(inode)->i_data, inode->i_size, +- sizeof(SYSV_I(inode)->i_data) - 1); +- } ++ inode->i_op = &sysv_symlink_inode_operations; ++ inode->i_mapping->a_ops = &sysv_aops; + } else + init_special_inode(inode, inode->i_mode, rdev); + } diff --git a/queue-3.14/series b/queue-3.14/series index 6c9bb1c1916..f7375ee071e 100644 --- a/queue-3.14/series +++ b/queue-3.14/series @@ -29,3 +29,4 @@ parisc-fix-syscall-restarts.patch parisc-fix-__arch_si_preamble_size.patch v4l2-compat-ioctl32-fix-alignment-for-arm64.patch media-vb2-dma-contig-fully-cache-synchronise-buffers-in-prepare-and-finish.patch +fix-sysvfs-symlinks.patch -- 2.47.3