All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [ammarfaizi2-block:dhowells/linux-fs/fscache-fixes 1/4] security/selinux/hooks.c:2772:45: warning: variable 'root_isec' set but not used
@ 2022-08-24 23:43 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2022-08-24 23:43 UTC (permalink / raw
  To: David Howells
  Cc: kbuild-all, Ammar Faizi, GNU/Weeb Mailing List, linux-kernel

tree:   https://github.com/ammarfaizi2/linux-block dhowells/linux-fs/fscache-fixes
head:   900828ab172a767a0819d99718dcceb778be0d63
commit: de284e31dcfda8ae7b56eaef89efe60be34ecdf9 [1/4] vfs, security: Fix automount superblock LSM init problem, preventing NFS sb sharing
config: i386-defconfig (https://download.01.org/0day-ci/archive/20220825/202208250749.ugs8aIcf-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-5) 11.3.0
reproduce (this is a W=1 build):
        # https://github.com/ammarfaizi2/linux-block/commit/de284e31dcfda8ae7b56eaef89efe60be34ecdf9
        git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
        git fetch --no-tags ammarfaizi2-block dhowells/linux-fs/fscache-fixes
        git checkout de284e31dcfda8ae7b56eaef89efe60be34ecdf9
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash security/selinux/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   security/selinux/hooks.c: In function 'selinux_fs_context_init':
>> security/selinux/hooks.c:2772:45: warning: variable 'root_isec' set but not used [-Wunused-but-set-variable]
    2772 |         const struct inode_security_struct *root_isec;
         |                                             ^~~~~~~~~


vim +/root_isec +2772 security/selinux/hooks.c

  2767	
  2768	static int selinux_fs_context_init(struct fs_context *fc,
  2769					   struct dentry *reference)
  2770	{
  2771		const struct superblock_security_struct *sbsec;
> 2772		const struct inode_security_struct *root_isec;
  2773		struct selinux_mnt_opts *opts;
  2774	
  2775		if (fc->purpose == FS_CONTEXT_FOR_SUBMOUNT) {
  2776			opts = kzalloc(sizeof(*opts), GFP_KERNEL);
  2777			if (!opts)
  2778				return -ENOMEM;
  2779	
  2780			root_isec = backing_inode_security(reference->d_sb->s_root);
  2781			sbsec = selinux_superblock(reference->d_sb);
  2782			if (sbsec->flags & FSCONTEXT_MNT)
  2783				opts->fscontext_sid	= sbsec->sid;
  2784			if (sbsec->flags & CONTEXT_MNT)
  2785				opts->context_sid	= sbsec->mntpoint_sid;
  2786			if (sbsec->flags & DEFCONTEXT_MNT)
  2787				opts->defcontext_sid	= sbsec->def_sid;
  2788			fc->security = opts;
  2789		}
  2790	
  2791		return 0;
  2792	}
  2793	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-08-24 23:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-24 23:43 [ammarfaizi2-block:dhowells/linux-fs/fscache-fixes 1/4] security/selinux/hooks.c:2772:45: warning: variable 'root_isec' set but not used kernel test robot

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.