From: kernel test robot <lkp@intel.com>
To: Casey Schaufler <casey@schaufler-ca.com>,
paul@paul-moore.com, linux-security-module@vger.kernel.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
linux-kernel@vger.kernel.org, jmorris@namei.org,
serge@hallyn.com, keescook@chromium.org,
john.johansen@canonical.com, penguin-kernel@i-love.sakura.ne.jp,
stephen.smalley.work@gmail.com, selinux@vger.kernel.org
Subject: Re: [PATCH 1/1] LSM: infrastructure management of mount options
Date: Wed, 25 Nov 2026 10:49:39 +0800 [thread overview]
Message-ID: <20261125104210.ICeMgnNL-lkp@intel.com> (raw)
In-Reply-To: <20261124181522.30415-2-casey@schaufler-ca.com>
Hi Casey,
kernel test robot noticed the following build warnings:
[auto build test WARNING on pcmoore-selinux/next]
[also build test WARNING on linus/master v7.4-rc4 next-20261124]
[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/Casey-Schaufler/LSM-infrastructure-management-of-mount-options/20261124-101522
base: https://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux.git next
patch link: https://lore.kernel.org/r/20261124181522.30415-2-casey%40schaufler-ca.com
patch subject: [PATCH 1/1] LSM: infrastructure management of mount options
config: loongarch-defconfig (https://download.01.org/0day-ci/archive/20261125/20261125104210.ICeMgnNL-lkp@intel.com/config)
compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 2012344e5da8e03ea4b8283ecd6fad6e13f09d64)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261125/20261125104210.ICeMgnNL-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/20261125104210.ICeMgnNL-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> security/selinux/hooks.c:2887:6: warning: variable 'opts' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
2887 | if (!fc->security) {
| ^~~~~~~~~~~~~
security/selinux/hooks.c:2903:2: note: uninitialized use occurs here
2903 | opts->initialized = true;
| ^~~~
security/selinux/hooks.c:2887:2: note: remove the 'if' if its condition is always true
2887 | if (!fc->security) {
| ^~~~~~~~~~~~~~~~~~
security/selinux/hooks.c:2878:31: note: initialize the variable 'opts' to silence this warning
2878 | struct selinux_mnt_opts *opts;
| ^
| = NULL
1 warning generated.
vim +2887 security/selinux/hooks.c
2873
2874 static int selinux_fs_context_submount(struct fs_context *fc,
2875 struct super_block *reference)
2876 {
2877 const struct superblock_security_struct *sbsec = selinux_superblock(reference);
2878 struct selinux_mnt_opts *opts;
2879
2880 /*
2881 * Ensure that fc->security remains NULL when no options are set
2882 * as expected by selinux_set_mnt_opts().
2883 */
2884 if (!(sbsec->flags & (FSCONTEXT_MNT|CONTEXT_MNT|DEFCONTEXT_MNT)))
2885 return 0;
2886
> 2887 if (!fc->security) {
2888 int rc;
2889
2890 rc = lsm_mnt_opts_alloc(&fc->security);
2891 if (rc)
2892 return rc;
2893 opts = selinux_mnt_opts(fc->security);
2894 opts->initialized = true;
2895 }
2896
2897 if (sbsec->flags & FSCONTEXT_MNT)
2898 opts->fscontext_sid = sbsec->sid;
2899 if (sbsec->flags & CONTEXT_MNT)
2900 opts->context_sid = sbsec->mntpoint_sid;
2901 if (sbsec->flags & DEFCONTEXT_MNT)
2902 opts->defcontext_sid = sbsec->def_sid;
2903 opts->initialized = true;
2904 return 0;
2905 }
2906
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
prev parent reply other threads:[~2026-11-25 2:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20261124181522.30415-1-casey.ref@schaufler-ca.com>
2026-11-24 18:15 ` [PATCH 0/1] LSM: Mount option data management Casey Schaufler
2026-11-24 18:15 ` [PATCH 1/1] LSM: infrastructure management of mount options Casey Schaufler
2026-11-25 2:49 ` kernel test robot [this message]
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=20261125104210.ICeMgnNL-lkp@intel.com \
--to=lkp@intel.com \
--cc=casey@schaufler-ca.com \
--cc=jmorris@namei.org \
--cc=john.johansen@canonical.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=paul@paul-moore.com \
--cc=penguin-kernel@i-love.sakura.ne.jp \
--cc=selinux@vger.kernel.org \
--cc=serge@hallyn.com \
--cc=stephen.smalley.work@gmail.com \
/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
all inboxes | Powered by JetHome®