https://github.com/torvalds/linux
Revision bdcf0a423ea1c40bbb40e7ee483b50fc8aa3d758 authored by Thiago Rafael Becker on 14 December 2017, 23:33:12 UTC, committed by Linus Torvalds on 15 December 2017, 00:00:49 UTC
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>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 1f704fd
History
Tip revision: bdcf0a423ea1c40bbb40e7ee483b50fc8aa3d758 authored by Thiago Rafael Becker on 14 December 2017, 23:33:12 UTC
kernel: make groups_sort calling a responsibility group_info allocators
Tip revision: bdcf0a4
File Mode Size
.gitignore -rw-r--r-- 151 bytes
Kconfig -rw-r--r-- 7.8 KB
Makefile -rw-r--r-- 2.0 KB
gen_init_cpio.c -rw-r--r-- 12.8 KB
initramfs_data.S -rw-r--r-- 1.3 KB

back to top