Re: [PATCH v2] [V2] selinux: restore sleepable revalidation; keep fast no-sleep check
kernel test robot <[email protected]>
| Newsgroups | org.kernel.vger.selinux,dev.linux.lists.oe-kbuild-all,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
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/[email protected]/config) compiler: alpha-linux-gcc (GCC) 16.1.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260815/[email protected]/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 <[email protected]> | Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ 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