From: kernel test robot <lkp@intel.com>
To: David Howells <dhowells@redhat.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: Re: [PATCH v3] afs: Fix delayed allocation of a cell's anonymous key
Date: Sat, 29 Nov 2025 15:04:26 +0800 [thread overview]
Message-ID: <202511291414.IgkEFchx-lkp@intel.com> (raw)
In-Reply-To: <800328.1764325145@warthog.procyon.org.uk>
Hi David,
kernel test robot noticed the following build warnings:
[auto build test WARNING on linus/master]
[also build test WARNING on v6.18-rc7 next-20251128]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/David-Howells/afs-Fix-delayed-allocation-of-a-cell-s-anonymous-key/20251128-182016
base: linus/master
patch link: https://lore.kernel.org/r/800328.1764325145%40warthog.procyon.org.uk
patch subject: [PATCH v3] afs: Fix delayed allocation of a cell's anonymous key
config: riscv-allmodconfig (https://download.01.org/0day-ci/archive/20251129/202511291414.IgkEFchx-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project b3428bb966f1de8aa48375ffee0eba04ede133b7)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251129/202511291414.IgkEFchx-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202511291414.IgkEFchx-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> fs/afs/security.c:29:6: warning: variable 'key' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
29 | if (!cell->anonymous_key) {
| ^~~~~~~~~~~~~~~~~~~~
fs/afs/security.c:36:13: note: uninitialized use occurs here
36 | if (IS_ERR(key))
| ^~~
fs/afs/security.c:29:2: note: remove the 'if' if its condition is always true
29 | if (!cell->anonymous_key) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
fs/afs/security.c:26:17: note: initialize the variable 'key' to silence this warning
26 | struct key *key;
| ^
| = NULL
1 warning generated.
vim +29 fs/afs/security.c
20
21 /*
22 * Allocate a key to use as a placeholder for anonymous user security.
23 */
24 static int afs_alloc_anon_key(struct afs_cell *cell)
25 {
26 struct key *key;
27
28 mutex_lock(&afs_key_lock);
> 29 if (!cell->anonymous_key) {
30 key = rxrpc_get_null_key(cell->key_desc);
31 if (!IS_ERR(key))
32 cell->anonymous_key = key;
33 }
34 mutex_unlock(&afs_key_lock);
35
36 if (IS_ERR(key))
37 return PTR_ERR(key);
38
39 _debug("anon key %p{%x}",
40 cell->anonymous_key, key_serial(cell->anonymous_key));
41 return 0;
42 }
43
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next parent reply other threads:[~2025-11-29 7:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <800328.1764325145@warthog.procyon.org.uk>
2025-11-29 7:04 ` kernel test robot [this message]
2025-11-29 12:46 ` [PATCH v3] afs: Fix delayed allocation of a cell's anonymous key David Howells
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202511291414.IgkEFchx-lkp@intel.com \
--to=lkp@intel.com \
--cc=dhowells@redhat.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox