android_kernel_samsung_msm8976/net/sunrpc
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
..
auth_gss kernel: make groups_sort calling a responsibility group_info allocators 2019-07-27 21:46:18 +02:00
xprtrdma
addr.c
auth.c
auth_generic.c
auth_null.c
auth_unix.c
backchannel_rqst.c Merge remote-tracking branch 'f2fs/linux-3.10.y' into HEAD 2017-04-18 17:02:28 +02:00
bc_svc.c
cache.c sunrpc/cache: fix off-by-one in qword_get() 2016-03-03 15:06:24 -08:00
clnt.c
Kconfig
Makefile
netns.h
rpc_pipe.c
rpcb_clnt.c
sched.c
socklib.c
stats.c
sunrpc.h
sunrpc_syms.c
svc.c svc: Avoid garbage replies when pc_func() returns rpc_drop_reply 2019-07-27 21:42:35 +02:00
svc_xprt.c
svcauth.c
svcauth_unix.c kernel: make groups_sort calling a responsibility group_info allocators 2019-07-27 21:46:18 +02:00
svcsock.c
sysctl.c
timer.c
xdr.c
xprt.c
xprtsock.c