Skip to contentSkip to conversation

security/selinux/hooks.c:249:41: sparse: sparse: Using plain integer as NULL pointer

PATCH kernel test robot 1 participant 1 message Jul 20, 2023 Memory management

lore
Share & tools
lore

kernel test robot

author build bot
#0 lore raw
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   c58c49dd89324b18a812762a2bfa5a0458e4f252
commit: dd51fcd42fd6bf37608f54303b974b47f73c1490 [3278/3762] selinux: introduce and use lsm_ad_net_init*() helpers
config: x86_64-randconfig-x063-20230720 (https://download.01.org/0day-ci/archive/20230721/[email protected]/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce: (https://download.01.org/0day-ci/archive/20230721/[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]/

sparse warnings: (new ones prefixed by >>)

>> security/selinux/hooks.c:249:41: sparse: sparse: Using plain integer as NULL pointer

security/selinux/hooks.c:5392:22: sparse: sparse: restricted __be16 degrades to integer security/selinux/hooks.c:5393:22: sparse: sparse: restricted __be16 degrades to integer

vim +249 security/selinux/hooks.c

244
245 static void ad_net_init_from_iif(struct common_audit_data *ad,
246 struct lsm_network_audit *net,
247 int ifindex, u16 family)
248 {

 > 249		__ad_net_init(ad, net, ifindex, 0, family);

250 }
251

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