mirror of
https://github.com/torvalds/linux.git
synced 2026-09-11 20:13:02 +02:00
afs: Fix incorrect free in candidate cleanup in afs_lookup_server()
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: 4882ba7857 ("afs: Fix afs_server ref accounting")
Link: https://sashiko.dev/#/patchset/20260729160108.2031453-1-dhowells%40redhat.com
Signed-off-by: David Howells <dhowells@redhat.com>
Link: https://patch.msgid.link/20260902121024.3328255-4-dhowells@redhat.com
cc: Marc Dionne <marc.dionne@auristor.com>
cc: linux-afs@lists.infradead.org
cc: linux-fsdevel@vger.kernel.org
cc: stable@vger.kernel.org
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
This commit is contained in:
parent
e3cfd3eb7d
commit
044d596094
|
|
@ -242,7 +242,6 @@ struct afs_server *afs_lookup_server(struct afs_cell *cell, struct key *key,
|
|||
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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user