linux-imx/fs
Linus Torvalds b59eea554f vfs: fix flock compat thinko
Michael Ellerman reported that commit 8c6657cb50 ("Switch flock
copyin/copyout primitives to copy_{from,to}_user()") broke his
networking on a bunch of PPC machines (64-bit kernel, 32-bit userspace).

The reason is a brown-paper bug by that commit, which had the arguments
to "copy_flock_fields()" in the wrong order, breaking the compat
handling for file locking.  Apparently very few people run 32-bit user
space on x86 any more, so the PPC people got the honor of noticing this
"feature".

Michael also sent a minimal diff that just changed the order of the
arguments in that macro.

This is not that minimal diff.

This not only changes the order of the arguments in the macro, it also
changes them to be pointers (to be consistent with all the other uses of
those pointers), and makes the functions that do all of this also have
the proper "const" attribution on the source pointers in order to make
issues like that (using the source as a destination) be really obvious.

Reported-by: Michael Ellerman <mpe@ellerman.id.au>
Acked-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-07-07 13:48:18 -07:00
..
9p
adfs
affs
afs Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2017-07-05 12:31:59 -07:00
autofs4 Merge branch 'linus' into sched/core, to pick up fixes 2017-06-24 08:57:20 +02:00
befs
bfs
btrfs Merge branch 'for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu 2017-07-06 08:59:41 -07:00
cachefiles sched/wait: Disambiguate wq_entry->task_list and wq_head->task_list naming 2017-06-20 12:19:14 +02:00
ceph
cifs Merge branch 'linus' into sched/core, to pick up fixes 2017-06-24 08:57:20 +02:00
coda fs: implement vfs_iter_write using do_iter_write 2017-06-29 17:49:23 -04:00
configfs
cramfs
crypto
debugfs
devpts
dlm
ecryptfs
efivarfs
efs
exofs
exportfs
ext2
ext4 UUID/GUID updates: 2017-07-03 09:55:26 -07:00
f2fs Merge branch 'for-4.13/block' of git://git.kernel.dk/linux-block 2017-07-03 10:34:51 -07:00
fat
freevxfs
fscache
fuse
gfs2 We've got eight GFS2 patches for this merge window: 2017-07-05 16:57:08 -07:00
hfs
hfsplus
hostfs
hpfs
hugetlbfs
isofs
jbd2 There has been a fair amount of activity in the docs tree this time 2017-07-03 21:13:25 -07:00
jffs2
jfs
kernfs
lockd
minix
ncpfs mm: per-cgroup memory reclaim stats 2017-07-06 16:24:35 -07:00
nfs Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security 2017-07-05 11:26:35 -07:00
nfs_common
nfsd Merge branch 'work.read_write' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2017-07-05 14:35:57 -07:00
nilfs2 Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-07-03 13:08:04 -07:00
nls
notify
ntfs
ocfs2 ocfs2: constify attribute_group structures 2017-07-06 16:24:30 -07:00
omfs
openpromfs
orangefs sched/wait: Disambiguate wq_entry->task_list and wq_head->task_list naming 2017-06-20 12:19:14 +02:00
overlayfs UUID/GUID updates: 2017-07-03 09:55:26 -07:00
proc arm64 updates for 4.13: 2017-07-05 17:09:27 -07:00
pstore pstore: use memdup_user 2017-06-27 17:02:36 -07:00
qnx4
qnx6
quota
ramfs
reiserfs sched/wait: Rename wait_queue_t => wait_queue_entry_t 2017-06-20 12:18:27 +02:00
romfs
squashfs
sysfs
sysv
tracefs
ubifs
udf
ufs Merge branch 'ufs-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2017-06-21 11:30:52 -07:00
xfs Merge branch 'for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu 2017-07-06 08:59:41 -07:00
aio.c fs: add O_DIRECT and aio support for sending down write life time hints 2017-06-27 12:05:36 -06:00
anon_inodes.c
attr.c
bad_inode.c
binfmt_aout.c
binfmt_elf_fdpic.c
binfmt_elf.c
binfmt_em86.c
binfmt_flat.c
binfmt_misc.c
binfmt_script.c
block_dev.c Merge branch 'for-4.13/block' of git://git.kernel.dk/linux-block 2017-07-03 10:34:51 -07:00
buffer.c fs: add support for buffered writeback to pass down write hints 2017-06-27 12:05:39 -06:00
char_dev.c
compat_binfmt_elf.c
compat_ioctl.c
compat.c
coredump.c
dax.c libnvdimm for 4.13 2017-07-07 09:44:06 -07:00
dcache.c mm: update callers to use HASH_ZERO flag 2017-07-06 16:24:33 -07:00
dcookies.c
direct-io.c fs: add O_DIRECT and aio support for sending down write life time hints 2017-06-27 12:05:36 -06:00
drop_caches.c
eventfd.c There has been a fair amount of activity in the docs tree this time 2017-07-03 21:13:25 -07:00
eventpoll.c sched/wait: Disambiguate wq_entry->task_list and wq_head->task_list naming 2017-06-20 12:19:14 +02:00
exec.c fs/exec.c: account for argv/envp pointers 2017-06-23 16:15:56 -07:00
fcntl.c vfs: fix flock compat thinko 2017-07-07 13:48:18 -07:00
fhandle.c
file_table.c
file.c fs/file.c: replace alloc_fdmem() with kvmalloc() alternative 2017-07-06 16:24:30 -07:00
filesystems.c
fs_pin.c sched/wait: Disambiguate wq_entry->task_list and wq_head->task_list naming 2017-06-20 12:19:14 +02:00
fs_struct.c
fs-writeback.c
inode.c mm: update callers to use HASH_ZERO flag 2017-07-06 16:24:33 -07:00
internal.h
ioctl.c
iomap.c fs: add O_DIRECT and aio support for sending down write life time hints 2017-06-27 12:05:36 -06:00
Kconfig
Kconfig.binfmt
libfs.c
locks.c
Makefile
mbcache.c
mount.h
mpage.c There has been a fair amount of activity in the docs tree this time 2017-07-03 21:13:25 -07:00
namei.c
namespace.c mm: update callers to use HASH_ZERO flag 2017-07-06 16:24:33 -07:00
no-block.c
nsfs.c
open.c fs: add fcntl() interface for setting/getting write life time hints 2017-06-27 12:05:22 -06:00
pipe.c
pnode.c
pnode.h
posix_acl.c
proc_namespace.c
read_write.c Merge branch 'work.read_write' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2017-07-05 14:35:57 -07:00
readdir.c
select.c Merge branch 'misc.compat' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2017-07-06 20:57:13 -07:00
seq_file.c
signalfd.c sched/wait: Rename wait_queue_t => wait_queue_entry_t 2017-06-20 12:18:27 +02:00
splice.c fs: implement vfs_iter_write using do_iter_write 2017-06-29 17:49:23 -04:00
stack.c
stat.c
statfs.c
super.c
sync.c
timerfd.c timerfd: Use get_itimerspec64() and put_itimerspec64() 2017-06-30 04:14:38 -04:00
userfaultfd.c mm/hugetlb: add size parameter to huge_pte_offset() 2017-07-06 16:24:34 -07:00
utimes.c
xattr.c