The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Yugansh Mittal <mittalyugansh1@gmail.com>,
	paul@paul-moore.com, selinux@vger.kernel.org,
	stephen.smalley.work@gmail.com, omosnace@redhat.com,
	linux-kernel@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev, Yugansh Mittal <mittalyugansh1@gmail.com>
Subject: Re: [PATCH v2] [V2] selinux: restore sleepable revalidation; keep fast no-sleep check
Date: Sat, 15 Aug 2026 22:23:52 +0800	[thread overview]
Message-ID: <202608152259.U1jKjeeX-lkp@intel.com> (raw)
In-Reply-To: <20250826172330.44006-1-mittalyugansh1@gmail.com>

Hi Yugansh,

kernel test robot noticed the following build errors:

[auto build test ERROR on pcmoore-selinux/next]
[also build test ERROR on linus/master v7.2-rc7 next-20260814]
[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/Yugansh-Mittal/selinux-restore-sleepable-revalidation-keep-fast-no-sleep-check/20260815-164746
base:   https://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux.git next
patch link:    https://lore.kernel.org/r/20250826172330.44006-1-mittalyugansh1%40gmail.com
patch subject: [PATCH v2] [V2] selinux: restore sleepable revalidation; keep fast no-sleep check
config: alpha-allmodconfig (https://download.01.org/0day-ci/archive/20260815/202608152259.U1jKjeeX-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 16.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260815/202608152259.U1jKjeeX-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/202608152259.U1jKjeeX-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from include/linux/build_bug.h:5,
                    from include/linux/init.h:5,
                    from security/selinux/hooks.c:24:
   security/selinux/hooks.c: In function '__inode_security_revalidate':
>> security/selinux/hooks.c:294:29: error: implicit declaration of function 'is_label_invalid' [-Wimplicit-function-declaration]
     294 |         if (likely(isec && !is_label_invalid(isec))) {
         |                             ^~~~~~~~~~~~~~~~
   include/linux/compiler.h:76:45: note: in definition of macro 'likely'
      76 | # define likely(x)      __builtin_expect(!!(x), 1)
         |                                             ^


vim +/is_label_invalid +294 security/selinux/hooks.c

   275	
   276	/*
   277	 * Try reloading inode security labels that have been marked as invalid.  The
   278	 * @may_sleep parameter indicates when sleeping and thus reloading labels is
   279	 * allowed; when set to false, returns -ECHILD when the label is
   280	 * invalid.  The @dentry parameter should be set to a dentry of the inode.
   281	 */
   282	static int __inode_security_revalidate(struct inode *inode,
   283					       struct dentry *dentry,
   284					       bool may_sleep)
   285	{
   286		struct inode_security_struct *isec;
   287	
   288		if (!selinux_initialized())
   289			return 0;
   290	
   291		/* Fast, non-blocking validity check first */
   292		rcu_read_lock();
   293		isec = selinux_inode(inode);
 > 294		if (likely(isec && !is_label_invalid(isec))) {
   295			rcu_read_unlock();
   296			return 0;   /* valid and no sleeping done */
   297		}
   298		rcu_read_unlock();
   299	
   300		/*
   301		* Label looks invalid. If we can't sleep, signal caller that a
   302		* retry in a sleepable context is required. Only contexts like
   303		* RCU path walk are expected to propagate -ECHILD.
   304		*/
   305		if (!may_sleep)
   306		return -ECHILD;
   307	
   308		/*
   309		* Sleepable context: reload the label. This may block.
   310		* If @dentry is NULL and no dentry can be found we'll continue
   311		* using the old label, consistent with prior behavior.
   312		*/
   313		might_sleep();
   314		inode_doinit_with_dentry(inode, dentry);
   315		return 0;
   316	}
   317	

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

      parent reply	other threads:[~2026-08-15 14:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-24 13:01 [PATCH 2/2] selinux: make __inode_security_revalidate non-sleeping Yugansh Mittal
2025-08-25 12:47 ` Stephen Smalley
2025-08-26 17:23 ` [PATCH v2] [V2] selinux: restore sleepable revalidation; keep fast no-sleep check Yugansh Mittal
2025-08-26 20:08   ` Stephen Smalley
2026-08-15 14:23   ` 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=202608152259.U1jKjeeX-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mittalyugansh1@gmail.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=omosnace@redhat.com \
    --cc=paul@paul-moore.com \
    --cc=selinux@vger.kernel.org \
    --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