]> git.baikalelectronics.ru Git - kernel.git/commit
sunrpc: only free unix grouplist after RCU settles
authorJeff Layton <jlayton@kernel.org>
Thu, 30 Mar 2023 18:24:27 +0000 (14:24 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 20 Apr 2023 10:07:33 +0000 (12:07 +0200)
commit4985490f62a343df0c03770cf3b1b96fefff532a
treed2170cffba2fb666b3b9c9341c8107b3e95f9cd5
parentafced9e0ae0074aa3a19875030a8192c9810694c
sunrpc: only free unix grouplist after RCU settles

[ Upstream commit 5085e41f9e83a1bec51da1f20b54f2ec3a13a3fe ]

While the unix_gid object is rcu-freed, the group_info list that it
contains is not. Ensure that we only put the group list reference once
we are really freeing the unix_gid object.

Reported-by: Zhi Li <yieli@redhat.com>
Link: https://bugzilla.redhat.com/show_bug.cgi?id=2183056
Signed-off-by: Jeff Layton <jlayton@kernel.org>
Fixes: 355bf6eb6b63 ("SUNRPC: Make server side AUTH_UNIX use lockless lookups")
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/sunrpc/svcauth_unix.c