tree:
https://github.com/cschaufler/smack-next next
head: 322dd63c7f98315b5794653bc582d109841219ae
commit: 322dd63c7f98315b5794653bc582d109841219ae [3/3] Smack: Use the netlabel cache
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 322dd63c7f98315b5794653bc582d109841219ae
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=xtensa
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
security/smack/smack_lsm.c: In function 'smack_from_netlbl':
> security/smack/smack_lsm.c:3866:6: warning: variable 'rc'
set but not used [-Wunused-but-set-variable]
3866 | int rc = 0;
| ^~
#
https://github.com/cschaufler/smack-next/commit/322dd63c7f98315b5794653bc...
git remote add cschaufler
https://github.com/cschaufler/smack-next
git fetch --no-tags cschaufler next
git checkout 322dd63c7f98315b5794653bc582d109841219ae
vim +/rc +3866 security/smack/smack_lsm.c
3848
3849 /**
3850 * smack_from_netlbl - Smack data from the IP options in an skb
3851 * @sk: socket data came in on
3852 * @family: address family
3853 * @skb: packet
3854 *
3855 * Find the Smack label in the IP options. If it hasn't been
3856 * added to the netlabel cache, add it here.
3857 *
3858 * Returns smack_known of the IP options or NULL if that won't work.
3859 */
3860 static struct smack_known *smack_from_netlbl(struct sock *sk, u16 family,
3861 struct sk_buff *skb)
3862 {
3863 struct netlbl_lsm_secattr secattr;
3864 struct socket_smack *ssp = NULL;
3865 struct smack_known *skp = NULL;
3866 int rc = 0;
3867
3868 netlbl_secattr_init(&secattr);
3869
3870 if (sk)
3871 ssp = sk->sk_security;
3872
3873 if (netlbl_skbuff_getattr(skb, family, &secattr) == 0) {
3874 skp = smack_from_secattr(&secattr, ssp);
3875 if (secattr.flags & NETLBL_SECATTR_CACHEABLE)
3876 rc = netlbl_cache_add(skb, family, &skp->smk_netlabel);
3877 }
3878
3879 netlbl_secattr_destroy(&secattr);
3880
3881 return skp;
3882 }
3883
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org