mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
afs: Fix leak of ungot volume
Fix afs_lookup_volume_rcu() so that it doesn't leak a dying volume if
afs_try_get_volume() fails.
Fixes: 32222f0978 ("afs: Apply server breaks to mmap'd files in the call processor")
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-17-dhowells@redhat.com
cc: Marc Dionne <marc.dionne@auristor.com>
cc: Deepakkumar Karn <dkarn@redhat.com>
cc: linux-afs@lists.infradead.org
Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
This commit is contained in:
parent
794a011103
commit
d672c276f6
|
|
@ -134,6 +134,7 @@ static struct afs_volume *afs_lookup_volume_rcu(struct afs_cell *cell,
|
|||
|
||||
if (volume && afs_try_get_volume(volume, afs_volume_trace_get_callback))
|
||||
break;
|
||||
volume = NULL;
|
||||
}
|
||||
|
||||
return volume;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user