[linux-next:master 1141/3789] net/ipv4/inet_diag.c:1511:17: sparse: sparse: Using plain integer as NULL pointer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   076d56d74f17e625b3d63cf4743b3d7d02180379
commit: 223f55196bbdb182a9b8de6108a0834b5e5e832e [1141/3789] inet_diag: allow concurrent operations
config: hexagon-randconfig-r122-20240202 (https://download.01.org/0day-ci/archive/20240203/202402030006.2bwG9hee-lkp@xxxxxxxxx/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project 7dd790db8b77c4a833c06632e903dc4f13877a64)
reproduce: (https://download.01.org/0day-ci/archive/20240203/202402030006.2bwG9hee-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202402030006.2bwG9hee-lkp@xxxxxxxxx/

sparse warnings: (new ones prefixed by >>)
>> net/ipv4/inet_diag.c:1511:17: sparse: sparse: Using plain integer as NULL pointer

vim +1511 net/ipv4/inet_diag.c

  1503	
  1504	int inet_diag_register(const struct inet_diag_handler *h)
  1505	{
  1506		const __u16 type = h->idiag_type;
  1507	
  1508		if (type >= IPPROTO_MAX)
  1509			return -EINVAL;
  1510	
> 1511		return !cmpxchg((const struct inet_diag_handler **)&inet_diag_table[type],
  1512				NULL, h) ? 0 : -EEXIST;
  1513	}
  1514	EXPORT_SYMBOL_GPL(inet_diag_register);
  1515	

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




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux