OSDN Git Service

sunrpc: only free unix grouplist after RCU settles
authorJeff Layton <jlayton@kernel.org>
Thu, 30 Mar 2023 18:24:27 +0000 (14:24 -0400)
committerChuck Lever <chuck.lever@oracle.com>
Tue, 4 Apr 2023 13:55:27 +0000 (09:55 -0400)
commit5085e41f9e83a1bec51da1f20b54f2ec3a13a3fe
tree2f52af42c56010a8c14442378c3f6d27472a9e47
parent15a8b55dbb1ba154d82627547c5761cac884d810
sunrpc: only free unix grouplist after RCU settles

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: fd5d2f78261b ("SUNRPC: Make server side AUTH_UNIX use lockless lookups")
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
net/sunrpc/svcauth_unix.c