diff options
| author | David Howells <dhowells@redhat.com> | 2026-06-22 10:08:50 +0100 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2026-07-01 15:26:21 +0200 |
| commit | d672c276f685a540ed2b2a8bafaed4650a89022c (patch) | |
| tree | 9127192142ccb344931e0f3dd29003164f45a046 /fs | |
| parent | 794a01110390c1b76f59ece773fb0fbfd89c6f5c (diff) | |
| download | linux-2.6-d672c276f685a540ed2b2a8bafaed4650a89022c.tar.gz linux-2.6-d672c276f685a540ed2b2a8bafaed4650a89022c.zip | |
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: 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@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>
Diffstat (limited to 'fs')
| -rw-r--r-- | fs/afs/callback.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/afs/callback.c b/fs/afs/callback.c index 74853e0d0435..61354003c006 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; |
