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 svcrdma: Select NFSv4.1 backchannel transport based on forward channel 2014-09-05 16:28:37 -07:00
Kconfig
Makefile
addr.c
auth.c arch: Mass conversion of smp_mb__*() 2014-08-15 11:45:28 -07:00
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
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 SUNRPC: Fix a module reference leak in svc_handle_xprt 2014-07-06 18:54:14 -07:00
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 svcrdma: Select NFSv4.1 backchannel transport based on forward channel 2014-09-05 16:28:37 -07:00
sysctl.c
timer.c
xdr.c
xprt.c This is the 3.10.67 stable release 2015-04-24 18:04:40 -07:00
xprtsock.c arch: Mass conversion of smp_mb__*() 2014-08-15 11:45:28 -07:00