android_kernel_samsung_msm8976/fs
Sasha Levin 79b91af4b7 vfs: read file_handle only once in handle_to_path.
We used to read file_handle twice.  Once to get the amount of extra
bytes, and once to fetch the entire structure.

This may be problematic since we do size verifications only after the
first read, so if the number of extra bytes changes in userspace between
the first and second calls, we'll have an incoherent view of
file_handle.

Instead, read the constant size once, and copy that over to the final
structure without having to re-read it again.

Git-commit: 161f873b89136eb1e69477c847d5a5033239d9ba
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

Change-Id: Id64c2a7b7e751b0d55c5bbe871152a4b0f88c630
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: stable@vger.kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Zhoulu Luo <zluo@codeaurora.org>
2015-07-22 07:25:30 -07:00
..
9p
adfs
affs
afs
autofs4 autofs4 copy_dev_ioctl(): keep the value of ->size we'd used for allocation 2015-03-18 13:22:32 +01:00
befs
bfs
btrfs This is the 3.10.73 stable release 2015-04-24 18:14:57 -07:00
cachefiles
ceph ceph: allow sync_read/write return partial successed size of read/write. 2014-01-09 12:24:25 -08:00
cifs This is the 3.10.67 stable release 2015-04-24 18:04:40 -07:00
coda
configfs
cramfs
debugfs This is the 3.10.73 stable release 2015-04-24 18:14:57 -07:00
devpts
dlm
ecryptfs eCryptfs: Remove buggy and unnecessary write in file name decode routine 2015-01-08 09:58:17 -08:00
efivarfs
efs
exofs ore: Fix wrong math in allocation of per device BIO 2014-02-13 13:48:00 -08:00
exportfs
ext2 ext2: Fix oops in ext2_get_block() called from ext2_quota_write() 2014-12-16 09:09:43 -08:00
ext3 This is the 3.10.67 stable release 2015-04-24 18:04:40 -07:00
ext4 This is the 3.10.73 stable release 2015-04-24 18:14:57 -07:00
f2fs
fat Add compat_ioctl support for VFAT_IOCTL_GET_VOLUME_ID 2014-06-13 12:05:26 -07:00
freevxfs
fscache
fuse fuse: fuse: add time_gran to INIT_OUT 2015-06-09 17:04:07 -07:00
gfs2 arch: Mass conversion of smp_mb__*() 2014-08-15 11:45:28 -07:00
hfs
hfsplus
hostfs
hpfs
hppfs
hugetlbfs cope with potentially long ->d_dname() output for shmem/hugetlb 2014-01-09 16:35:41 -08:00
isofs isofs: Fix unchecked printing of ER records 2015-01-08 09:58:15 -08:00
jbd
jbd2 This is the 3.10.67 stable release 2015-04-24 18:04:40 -07:00
jffs2 jffs2: fix handling of corrupted summary length 2015-03-06 14:40:53 -08:00
jfs
lockd LOCKD: Fix a race when initialising nlmsvc_timeout 2015-01-27 07:52:33 -08:00
logfs
minix
ncpfs ncpfs: return proper error from NCP_IOC_SETROOT ioctl 2015-01-08 09:58:17 -08:00
nfs This is the 3.10.73 stable release 2015-04-24 18:14:57 -07:00
nfs_common
nfsd nfsd4: fix xdr4 inclusion of escaped char 2015-01-16 06:59:02 -08:00
nilfs2 nilfs2: fix deadlock of segment constructor during recovery 2015-03-26 15:00:59 +01:00
nls
notify fsnotify: next_i is freed during fsnotify_unmount_inodes. 2015-01-27 07:52:33 -08:00
ntfs
ocfs2 ocfs2: fix journal commit deadlock 2015-01-16 06:59:00 -08:00
omfs
openpromfs
proc proc/pagemap: walk page tables under pte lock 2015-05-11 15:58:51 -07:00
pstore This is the 3.10.73 stable release 2015-04-24 18:14:57 -07:00
qnx4
qnx6
quota quota: provide interface for readding allocated space into reserved space 2015-01-29 17:40:57 -08:00
ramfs
reiserfs reiserfs: call truncate_setsize under tailpack mutex 2014-07-06 18:54:15 -07:00
romfs
squashfs
sysfs
sysv
ubifs This is the 3.10.67 stable release 2015-04-24 18:04:40 -07:00
udf udf: Verify symlink size before loading it 2015-01-08 09:58:17 -08:00
ufs
xfs xfs: set superblock buffer type correctly 2015-03-06 14:40:47 -08:00
yaffs2
Kconfig
Kconfig.binfmt
Makefile
aio.c aio: fix kernel memory disclosure in io_getevents() introduced in v3.10 2014-06-30 20:09:45 -07:00
anon_inodes.c
attr.c fs,userns: Change inode_capable to capable_wrt_inode_uidgid 2014-06-16 13:42:52 -07:00
bad_inode.c
binfmt_aout.c mm: remove free_area_cache 2014-02-07 13:49:41 -08:00
binfmt_elf.c This is the 3.10.73 stable release 2015-04-24 18:14:57 -07:00
binfmt_elf_fdpic.c
binfmt_em86.c
binfmt_flat.c
binfmt_misc.c
binfmt_script.c
binfmt_som.c
bio-integrity.c bio-integrity: Fix bio_integrity_verify segment start bug 2014-03-23 21:38:21 -07:00
bio.c platform: msm: fix PFT when using direct-io 2014-06-23 21:38:40 +03:00
block_dev.c mm: vmscan: take page buffers dirty and locked state into account 2014-12-11 15:12:10 +05:30
buffer.c This is the 3.10.67 stable release 2015-04-24 18:04:40 -07:00
char_dev.c
compat.c compat: let architectures define __ARCH_WANT_COMPAT_SYS_GETDENTS64 2014-08-15 11:41:28 -07:00
compat_binfmt_elf.c binfmt_elf: add ELF_HWCAP2 to compat auxv entries 2015-03-19 14:52:32 -07:00
compat_ioctl.c fs: Add TTY PM IOCTLs to compat table 2014-07-30 10:25:00 -06:00
coredump.c coredump: fix the setting of PF_DUMPCORE 2014-07-31 12:53:50 -07:00
coredump.h
dcache.c vfs: fix bad hashing of dentries 2014-09-17 09:04:02 -07:00
dcookies.c fs/compat: fix lookup_dcookie() parameter handling 2014-02-13 13:48:00 -08:00
direct-io.c platform: msm: fix PFT when using direct-io 2014-06-23 21:38:40 +03:00
drop_caches.c
eventfd.c
eventpoll.c Revert "epoll: use freezable blocking call" 2014-08-29 14:20:41 -07:00
exec.c seccomp: implement SECCOMP_FILTER_FLAG_TSYNC 2015-03-19 14:52:56 -07:00
fcntl.c
fhandle.c vfs: read file_handle only once in handle_to_path. 2015-07-22 07:25:30 -07:00
file.c Merge upstream linux-stable v3.10.36 into msm-3.10 2014-04-23 16:23:49 -07:00
file_table.c don't bother with {get,put}_write_access() on non-regular files 2014-05-30 21:52:12 -07:00
filesystems.c
fs-writeback.c This is the 3.10.67 stable release 2015-04-24 18:04:40 -07:00
fs_struct.c
generic_acl.c
inode.c fs,userns: Change inode_capable to capable_wrt_inode_uidgid 2014-06-16 13:42:52 -07:00
internal.h
ioctl.c
ioprio.c block: Fix computation of merged request priority 2014-11-21 09:22:53 -08:00
libfs.c
locks.c locks: allow __break_lease to sleep even when break_time is 0 2014-05-13 13:59:44 +02:00
mbcache.c
mount.h vfs: Is mounted should be testing mnt_ns for NULL or error. 2014-02-06 11:08:16 -08:00
mpage.c
namei.c This is the 3.10.67 stable release 2015-04-24 18:04:40 -07:00
namespace.c umount: Disallow unprivileged mount force 2015-01-08 09:58:16 -08:00
no-block.c
open.c Merge upstream tag 'v3.10.49' into msm-3.10 2014-08-20 13:23:09 -07:00
pipe.c
pnode.c
pnode.h
posix_acl.c posix_acl: handle NULL ACL in posix_acl_equiv_mode 2014-06-07 13:25:33 -07:00
proc_namespace.c
read_write.c Merge upstream linux-stable v3.10.36 into msm-3.10 2014-04-23 16:23:49 -07:00
readdir.c
select.c
seq_file.c fs/seq_file: Use vmalloc by default for allocations > PAGE_SIZE 2014-09-23 10:37:58 -06:00
signalfd.c
splice.c fuse: fix pipe_buf_operations 2014-02-13 13:47:59 -08:00
stack.c
stat.c quota: provide interface for readding allocated space into reserved space 2015-01-29 17:40:57 -08:00
statfs.c
super.c This is the 3.10.67 stable release 2015-04-24 18:04:40 -07:00
sync.c
timerfd.c timerfd: support CLOCK_BOOTTIME clock 2014-06-13 12:06:03 -07:00
utimes.c
xattr.c
xattr_acl.c