[jj-apparmor:apparmor-next 14/14] security/apparmor/net.c:320:9: warning: the address of 'needput' will always evaluate as 'true'
kernel test robot <[email protected]>
| Newsgroups | dev.linux.lists.oe-kbuild-all |
|---|---|
| Message-ID | <[email protected]> |
Hi John, FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant. tree: https://git.kernel.org/pub/scm/linux/kernel/git/jj/linux-apparmor.git apparmor-next head: bbb153c86dafaa6497b8a0a5372d1e79be8a7617 commit: bbb153c86dafaa6497b8a0a5372d1e79be8a7617 [14/14] apparmor: optimize current_label_crit_section() with needput config: powerpc-allmodconfig (https://download.01.org/0day-ci/archive/20260808/[email protected]/config) compiler: powerpc64-linux-gcc (GCC) 16.1.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260808/[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 warnings (new ones prefixed by >>): security/apparmor/net.c: In function 'aa_sk_perm': >> security/apparmor/net.c:320:9: warning: the address of 'needput' will always evaluate as 'true' [-Waddress] 320 | end_current_label_crit_section(label, &needput); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ vim +320 security/apparmor/net.c 307 308 int aa_sk_perm(const char *op, u32 request, struct sock *sk) 309 { 310 struct aa_label *label; 311 bool needput; 312 int error; 313 314 AA_BUG(!sk); 315 AA_BUG(in_interrupt()); 316 317 /* TODO: switch to begin_current_label ???? */ 318 label = begin_current_label_crit_section(&needput); 319 error = aa_label_sk_perm(current_cred(), label, op, request, sk); > 320 end_current_label_crit_section(label, &needput); 321 322 return error; 323 } 324 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki