mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 09:36:22 +02:00
afs: Fix vllist leak
Fix a leak of the new vllist in afs_update_cell() in the event that it is an
empty list (nr_servers == 0), in which case the old list isn't displaced
unless the old list is also empty.
Fixes: d5c32c89b2 ("afs: Fix cell DNS lookup")
Closes: https://sashiko.dev/#/patchset/20260609081738.770127-1-dhowells%40redhat.com
Signed-off-by: David Howells <dhowells@redhat.com>
Link: https://patch.msgid.link/20260622090856.2746629-18-dhowells@redhat.com
cc: Marc Dionne <marc.dionne@auristor.com>
cc: linux-afs@lists.infradead.org
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
This commit is contained in:
parent
d672c276f6
commit
fc10c0ecf0
|
|
@ -547,6 +547,8 @@ static int afs_update_cell(struct afs_cell *cell)
|
|||
rcu_assign_pointer(cell->vl_servers, vllist);
|
||||
cell->dns_source = vllist->source;
|
||||
old = p;
|
||||
} else {
|
||||
old = vllist;
|
||||
}
|
||||
write_unlock(&cell->vl_servers_lock);
|
||||
afs_put_vlserverlist(cell->net, old);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user