android_kernel_samsung_msm8976/arch/s390/kernel
Thiago Rafael Becker 079cf0277b kernel: make groups_sort calling a responsibility group_info allocators
commit bdcf0a423ea1c40bbb40e7ee483b50fc8aa3d758 upstream.

In testing, we found that nfsd threads may call set_groups in parallel
for the same entry cached in auth.unix.gid, racing in the call of
groups_sort, corrupting the groups for that entry and leading to
permission denials for the client.

This patch:
 - Make groups_sort globally visible.
 - Move the call to groups_sort to the modifiers of group_info
 - Remove the call to groups_sort from set_groups

Link: http://lkml.kernel.org/r/20171211151420.18655-1-thiago.becker@gmail.com
Signed-off-by: Thiago Rafael Becker <thiago.becker@gmail.com>
Reviewed-by: Matthew Wilcox <mawilcox@microsoft.com>
Reviewed-by: NeilBrown <neilb@suse.com>
Acked-by: "J. Bruce Fields" <bfields@fieldses.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
[bwh: Backported to 3.16: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
2019-07-27 21:46:18 +02:00
..
vdso32
vdso64
.gitignore
Makefile
asm-offsets.c
audit.c
audit.h
base.S
bitmap.c
cache.c
compat_audit.c
compat_exec_domain.c
compat_linux.c kernel: make groups_sort calling a responsibility group_info allocators 2019-07-27 21:46:18 +02:00
compat_linux.h
compat_ptrace.h
compat_signal.c
compat_wrapper.S
cpcmd.c
crash_dump.c
debug.c
diag.c
dis.c
dumpstack.c
early.c
ebcdic.c
entry.S
entry.h
entry64.S
ftrace.c
head.S
head31.S
head64.S
head_kdump.S
ipl.c
irq.c
jump_label.c
kprobes.c
lgr.c
machine_kexec.c
mcount.S
mcount64.S
module.c
nmi.c
os_info.c
perf_cpum_cf.c
perf_event.c
pgm_check.S
process.c
processor.c
ptrace.c
reipl.S
reipl64.S
relocate_kernel.S
relocate_kernel64.S
runtime_instr.c
s390_ksyms.c
sclp.S
setup.c
signal.c
smp.c
stacktrace.c
suspend.c
swsusp_asm64.S
sys_s390.c
syscalls.S
sysinfo.c
time.c
topology.c
traps.c
vdso.c
vmlinux.lds.S
vtime.c