linux/arch/s390
Thiago Rafael Becker d92fb5824b kernel: make groups_sort calling a responsibility group_info allocators
commit bdcf0a423e 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>
History 2018-03-03 15:51:59 +00:00
..
appldata s390/appldata: add slab.h for kzalloc/kfree 2014-05-20 08:58:51 +02:00
boot s390/decompressor: fix initrd corruption caused by bss clear 2017-07-18 18:40:20 +01:00
configs s390: update default configuration 2014-06-11 10:13:30 +02:00
crypto crypto: s390/ghash - Fix incorrect ghash icv buffer handling. 2015-06-02 12:08:17 +01:00
hypfs s390/hypfs: Use get_free_page() instead of kmalloc to ensure page alignment 2017-02-23 03:54:23 +00:00
include s390: always save and restore all registers on context switch 2018-03-03 15:51:44 +00:00
kernel kernel: make groups_sort calling a responsibility group_info allocators 2018-03-03 15:51:59 +00:00
kvm KVM: s390: Disable dirty log retrieval for UCONTROL guests 2017-06-05 21:17:04 +01:00
lib s390/spinlock: avoid yield to non existent cpu 2016-06-15 21:29:24 +01:00
math-emu s390: fix save and restore of the floating-point-control register 2013-10-24 17:17:11 +02:00
mm s390/mm: fix write access check in gup_huge_pmd() 2018-01-01 20:51:32 +00:00
net net: filter: get rid of BPF_S_* enum 2014-06-01 22:16:58 -07:00
oprofile s390/oprofile: make return of 0 explicit 2014-05-27 10:26:00 +02:00
pci s390/pci: enforce fmb page boundary rule 2016-05-01 00:05:58 +02:00
defconfig s390: update default configuration 2014-06-11 10:13:30 +02:00
Kbuild s390/pci: base support 2012-11-30 15:40:45 +01:00
Kconfig s390/locking: Reenable optimistic spinning 2014-09-17 09:21:51 -07:00
Kconfig.debug Kconfig: consolidate CONFIG_DEBUG_STRICT_USER_COPY_CHECKS 2013-04-30 17:04:09 -07:00
Makefile s390: allow to set gcc -mtune flag 2013-10-31 09:54:01 +01:00