From: kernel test robot <lkp@intel.com>
To: oe-kbuild@lists.linux.dev
Cc: lkp@intel.com, Dan Carpenter <error27@gmail.com>
Subject: [melver:cap-analysis/dev 23/35] security/selinux/avc.c:483 avc_reclaim_node() error: uninitialized symbol 'flags'.
Date: Tue, 23 Sep 2025 08:12:59 +0800 [thread overview]
Message-ID: <202509230813.j9h9IIQa-lkp@intel.com> (raw)
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
TO: elver@google.com
tree: https://git.kernel.org/pub/scm/linux/kernel/git/melver/linux.git cap-analysis/dev
head: b57fd8af63116c56536eb40f04dbe4f2206ec4ed
commit: 32b884d94862a5295719faf9e1c3b5eef162cca4 [23/35] compiler-capability-analysis: Remove __cond_lock() function-like helper
:::::: branch date: 4 days ago
:::::: commit date: 4 days ago
config: powerpc64-randconfig-r071-20250922 (https://download.01.org/0day-ci/archive/20250923/202509230813.j9h9IIQa-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project cafc064fc7a96b3979a023ddae1da2b499d6c954)
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>
| Reported-by: Dan Carpenter <error27@gmail.com>
| Closes: https://lore.kernel.org/r/202509230813.j9h9IIQa-lkp@intel.com/
New smatch warnings:
security/selinux/avc.c:483 avc_reclaim_node() error: uninitialized symbol 'flags'.
arch/powerpc/kernel/nvram_64.c:704 oops_to_nvram() error: uninitialized symbol 'flags'.
drivers/tty/serial/samsung_tty.c:2288 s3c24xx_serial_console_write() error: uninitialized symbol 'flags'.
drivers/tty/serial/st-asc.c:875 asc_console_write() error: uninitialized symbol 'flags'.
Old smatch warnings:
security/selinux/avc.c:488 avc_reclaim_node() error: uninitialized symbol 'flags'.
vim +/flags +483 security/selinux/avc.c
^1da177e4c3f41 Linus Torvalds 2005-04-16 458
e67b79850fcc4e Stephen Smalley 2023-03-09 459 static inline int avc_reclaim_node(void)
^1da177e4c3f41 Linus Torvalds 2005-04-16 460 {
^1da177e4c3f41 Linus Torvalds 2005-04-16 461 struct avc_node *node;
^1da177e4c3f41 Linus Torvalds 2005-04-16 462 int hvalue, try, ecx;
^1da177e4c3f41 Linus Torvalds 2005-04-16 463 unsigned long flags;
26036651c56260 Eric Paris 2009-02-12 464 struct hlist_head *head;
edf3d1aecd0d60 Eric Paris 2009-02-12 465 spinlock_t *lock;
^1da177e4c3f41 Linus Torvalds 2005-04-16 466
^1da177e4c3f41 Linus Torvalds 2005-04-16 467 for (try = 0, ecx = 0; try < AVC_CACHE_SLOTS; try++) {
e67b79850fcc4e Stephen Smalley 2023-03-09 468 hvalue = atomic_inc_return(&selinux_avc.avc_cache.lru_hint) &
6b6bc6205d9879 Stephen Smalley 2018-03-05 469 (AVC_CACHE_SLOTS - 1);
e67b79850fcc4e Stephen Smalley 2023-03-09 470 head = &selinux_avc.avc_cache.slots[hvalue];
e67b79850fcc4e Stephen Smalley 2023-03-09 471 lock = &selinux_avc.avc_cache.slots_lock[hvalue];
^1da177e4c3f41 Linus Torvalds 2005-04-16 472
edf3d1aecd0d60 Eric Paris 2009-02-12 473 if (!spin_trylock_irqsave(lock, flags))
^1da177e4c3f41 Linus Torvalds 2005-04-16 474 continue;
^1da177e4c3f41 Linus Torvalds 2005-04-16 475
618442509128fe Paul E. McKenney 2008-04-21 476 rcu_read_lock();
b67bfe0d42cac5 Sasha Levin 2013-02-27 477 hlist_for_each_entry(node, head, list) {
e67b79850fcc4e Stephen Smalley 2023-03-09 478 avc_node_delete(node);
^1da177e4c3f41 Linus Torvalds 2005-04-16 479 avc_cache_stats_incr(reclaims);
^1da177e4c3f41 Linus Torvalds 2005-04-16 480 ecx++;
^1da177e4c3f41 Linus Torvalds 2005-04-16 481 if (ecx >= AVC_CACHE_RECLAIM) {
618442509128fe Paul E. McKenney 2008-04-21 482 rcu_read_unlock();
edf3d1aecd0d60 Eric Paris 2009-02-12 @483 spin_unlock_irqrestore(lock, flags);
^1da177e4c3f41 Linus Torvalds 2005-04-16 484 goto out;
^1da177e4c3f41 Linus Torvalds 2005-04-16 485 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 486 }
618442509128fe Paul E. McKenney 2008-04-21 487 rcu_read_unlock();
edf3d1aecd0d60 Eric Paris 2009-02-12 488 spin_unlock_irqrestore(lock, flags);
^1da177e4c3f41 Linus Torvalds 2005-04-16 489 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 490 out:
^1da177e4c3f41 Linus Torvalds 2005-04-16 491 return ecx;
^1da177e4c3f41 Linus Torvalds 2005-04-16 492 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 493
:::::: The code at line 483 was first introduced by commit
:::::: edf3d1aecd0d608acbd561b0c527e1d41abcb657 SELinux: code readability with avc_cache
:::::: TO: Eric Paris <eparis@redhat.com>
:::::: CC: James Morris <jmorris@namei.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2025-09-23 0:14 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202509230813.j9h9IIQa-lkp@intel.com \
--to=lkp@intel.com \
--cc=error27@gmail.com \
--cc=oe-kbuild@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.