[PATCH 6.12 0868/1102] afs: Fix incorrect free in candidate cleanup in afs_lookup_server()
Greg Kroah-Hartman <[email protected]>
| Newsgroups | org.kernel.vger.linux-fsdevel,dev.linux.lists.patches,org.kernel.vger.stable |
|---|---|
| Message-ID | <[email protected]> |
6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: David Howells <[email protected]> commit 044d596094af4b769fb8e1173dff0d08bd68db6c upstream. Fix afs_lookup_server() to not free an existing server's endpoint state when cleaning up a candidate server. The candidate record doesn't have an endpoint state yet at this point, so the free for that can just be removed. Fixes: 4882ba78574e ("afs: Fix afs_server ref accounting") Link: https://sashiko.dev/#/patchset/20260729160108.2031453-1-dhowells%40redhat.com Signed-off-by: David Howells <[email protected]> Link: https://patch.msgid.link/[email protected] cc: Marc Dionne <[email protected]> cc: [email protected] cc: [email protected] cc: [email protected] Signed-off-by: Christian Brauner (Amutable) <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> --- fs/afs/server.c | 1 - 1 file changed, 1 deletion(-) --- a/fs/afs/server.c +++ b/fs/afs/server.c @@ -241,7 +241,6 @@ struct afs_server *afs_lookup_server(str out: afs_put_addrlist(alist, afs_alist_trace_put_server_create); if (candidate) { - kfree(rcu_access_pointer(server->endpoint_state)); kfree(candidate); afs_dec_servers_outstanding(cell->net); }