Files
linux/fs
David Howells 19eef1d98e afs: Fix uninit var in afs_alloc_anon_key()
Fix an uninitialised variable (key) in afs_alloc_anon_key() by setting it
to cell->anonymous_key.  Without this change, the error check may return a
false failure with a bad error number.

Most of the time this is unlikely to happen because the first encounter
with afs_alloc_anon_key() will usually be from (auto)mount, for which all
subsequent operations must wait - apart from other (auto)mounts.  Once the
call->anonymous_key is allocated, all further calls to afs_request_key()
will skip the call to afs_alloc_anon_key() for that cell.

Fixes: d27c712578 ("afs: Fix delayed allocation of a cell's anonymous key")
Reported-by: Paulo Alcantra <pc@manguebit.org>
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Paulo Alcantara <pc@manguebit.org>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: syzbot+41c68824eefb67cdf00c@syzkaller.appspotmail.com
cc: linux-afs@lists.infradead.org
cc: linux-fsdevel@vger.kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2025-11-28 16:48:18 -08:00
..
2025-06-10 22:21:16 -04:00
2025-11-12 10:12:39 +01:00
2025-09-13 16:55:07 -07:00
2025-09-13 16:55:13 -07:00
2025-09-16 23:59:38 -04:00
2025-09-21 19:24:50 -04:00
2025-09-26 10:21:23 +02:00
2025-10-07 12:48:33 +02:00
2025-11-12 10:47:42 +01:00
2025-09-01 13:08:01 +02:00
2025-09-29 13:43:52 -07:00
2025-08-29 15:08:07 +02:00
2025-05-23 14:20:44 +02:00
2025-11-12 10:12:39 +01:00