[PATCH 7.1 1382/2077] afs: Fix leak of ungot volume
Greg Kroah-Hartman
gregkh at linuxfoundation.org
Tue Jul 21 08:17:35 PDT 2026
7.1-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Howells <dhowells at redhat.com>
[ Upstream commit d672c276f685a540ed2b2a8bafaed4650a89022c ]
Fix afs_lookup_volume_rcu() so that it doesn't leak a dying volume if
afs_try_get_volume() fails.
Fixes: 32222f09782f ("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 at redhat.com>
Link: https://patch.msgid.link/20260622090856.2746629-17-dhowells@redhat.com
cc: Marc Dionne <marc.dionne at auristor.com>
cc: Deepakkumar Karn <dkarn at redhat.com>
cc: linux-afs at lists.infradead.org
Signed-off-by: Christian Brauner (Amutable) <brauner at kernel.org>
Signed-off-by: Sasha Levin <sashal at kernel.org>
---
fs/afs/callback.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/afs/callback.c b/fs/afs/callback.c
index 74853e0d0435ae..61354003c006cf 100644
--- a/fs/afs/callback.c
+++ b/fs/afs/callback.c
@@ -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;
--
2.53.0
More information about the linux-afs
mailing list