[netfilter-nf:testing 5/13] net/netfilter/ipset/ip_set_hash_gen.h:435:19: sparse: sparse: incorrect type in assignment (different address spaces)

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

 



tree:   git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf.git testing
head:   a7eaa3316ffa17957ee70a705000a3a942128820
commit: 6099505cd2a2652bbb4156582a22feb6d651b6d6 [5/13] netfilter: ipset: Missing gc cancellations fixed
config: x86_64-randconfig-123-20240208 (https://download.01.org/0day-ci/archive/20240209/202402090822.jJ0z40yz-lkp@xxxxxxxxx/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240209/202402090822.jJ0z40yz-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/202402090822.jJ0z40yz-lkp@xxxxxxxxx/

sparse warnings: (new ones prefixed by >>)
   net/netfilter/ipset/ip_set_hash_mac.c: note: in included file:
>> net/netfilter/ipset/ip_set_hash_gen.h:435:19: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct hbucket *n @@     got struct hbucket [noderef] __rcu * @@
   net/netfilter/ipset/ip_set_hash_gen.h:435:19: sparse:     expected struct hbucket *n
   net/netfilter/ipset/ip_set_hash_gen.h:435:19: sparse:     got struct hbucket [noderef] __rcu *
>> net/netfilter/ipset/ip_set_hash_gen.h:455:35: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected struct htable *t @@     got struct htable [noderef] __rcu *table @@
   net/netfilter/ipset/ip_set_hash_gen.h:455:35: sparse:     expected struct htable *t
   net/netfilter/ipset/ip_set_hash_gen.h:455:35: sparse:     got struct htable [noderef] __rcu *table
--
   net/netfilter/ipset/ip_set_hash_ip.c: note: in included file:
>> net/netfilter/ipset/ip_set_hash_gen.h:435:19: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct hbucket *n @@     got struct hbucket [noderef] __rcu * @@
   net/netfilter/ipset/ip_set_hash_gen.h:435:19: sparse:     expected struct hbucket *n
   net/netfilter/ipset/ip_set_hash_gen.h:435:19: sparse:     got struct hbucket [noderef] __rcu *
>> net/netfilter/ipset/ip_set_hash_gen.h:455:35: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected struct htable *t @@     got struct htable [noderef] __rcu *table @@
   net/netfilter/ipset/ip_set_hash_gen.h:455:35: sparse:     expected struct htable *t
   net/netfilter/ipset/ip_set_hash_gen.h:455:35: sparse:     got struct htable [noderef] __rcu *table
   net/netfilter/ipset/ip_set_hash_ip.c: note: in included file:
>> net/netfilter/ipset/ip_set_hash_gen.h:435:19: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct hbucket *n @@     got struct hbucket [noderef] __rcu * @@
   net/netfilter/ipset/ip_set_hash_gen.h:435:19: sparse:     expected struct hbucket *n
   net/netfilter/ipset/ip_set_hash_gen.h:435:19: sparse:     got struct hbucket [noderef] __rcu *
>> net/netfilter/ipset/ip_set_hash_gen.h:455:35: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected struct htable *t @@     got struct htable [noderef] __rcu *table @@
   net/netfilter/ipset/ip_set_hash_gen.h:455:35: sparse:     expected struct htable *t
   net/netfilter/ipset/ip_set_hash_gen.h:455:35: sparse:     got struct htable [noderef] __rcu *table
--
   net/netfilter/ipset/ip_set_hash_ipportip.c: note: in included file:
>> net/netfilter/ipset/ip_set_hash_gen.h:435:19: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct hbucket *n @@     got struct hbucket [noderef] __rcu * @@
   net/netfilter/ipset/ip_set_hash_gen.h:435:19: sparse:     expected struct hbucket *n
   net/netfilter/ipset/ip_set_hash_gen.h:435:19: sparse:     got struct hbucket [noderef] __rcu *
>> net/netfilter/ipset/ip_set_hash_gen.h:455:35: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected struct htable *t @@     got struct htable [noderef] __rcu *table @@
   net/netfilter/ipset/ip_set_hash_gen.h:455:35: sparse:     expected struct htable *t
   net/netfilter/ipset/ip_set_hash_gen.h:455:35: sparse:     got struct htable [noderef] __rcu *table
   net/netfilter/ipset/ip_set_hash_ipportip.c: note: in included file:
>> net/netfilter/ipset/ip_set_hash_gen.h:435:19: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct hbucket *n @@     got struct hbucket [noderef] __rcu * @@
   net/netfilter/ipset/ip_set_hash_gen.h:435:19: sparse:     expected struct hbucket *n
   net/netfilter/ipset/ip_set_hash_gen.h:435:19: sparse:     got struct hbucket [noderef] __rcu *
>> net/netfilter/ipset/ip_set_hash_gen.h:455:35: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected struct htable *t @@     got struct htable [noderef] __rcu *table @@
   net/netfilter/ipset/ip_set_hash_gen.h:455:35: sparse:     expected struct htable *t
   net/netfilter/ipset/ip_set_hash_gen.h:455:35: sparse:     got struct htable [noderef] __rcu *table
--
   net/netfilter/ipset/ip_set_hash_ipport.c: note: in included file:
>> net/netfilter/ipset/ip_set_hash_gen.h:435:19: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct hbucket *n @@     got struct hbucket [noderef] __rcu * @@
   net/netfilter/ipset/ip_set_hash_gen.h:435:19: sparse:     expected struct hbucket *n
   net/netfilter/ipset/ip_set_hash_gen.h:435:19: sparse:     got struct hbucket [noderef] __rcu *
>> net/netfilter/ipset/ip_set_hash_gen.h:455:35: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected struct htable *t @@     got struct htable [noderef] __rcu *table @@
   net/netfilter/ipset/ip_set_hash_gen.h:455:35: sparse:     expected struct htable *t
   net/netfilter/ipset/ip_set_hash_gen.h:455:35: sparse:     got struct htable [noderef] __rcu *table
   net/netfilter/ipset/ip_set_hash_ipport.c: note: in included file:
>> net/netfilter/ipset/ip_set_hash_gen.h:435:19: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct hbucket *n @@     got struct hbucket [noderef] __rcu * @@
   net/netfilter/ipset/ip_set_hash_gen.h:435:19: sparse:     expected struct hbucket *n
   net/netfilter/ipset/ip_set_hash_gen.h:435:19: sparse:     got struct hbucket [noderef] __rcu *
>> net/netfilter/ipset/ip_set_hash_gen.h:455:35: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected struct htable *t @@     got struct htable [noderef] __rcu *table @@
   net/netfilter/ipset/ip_set_hash_gen.h:455:35: sparse:     expected struct htable *t
   net/netfilter/ipset/ip_set_hash_gen.h:455:35: sparse:     got struct htable [noderef] __rcu *table
--
   net/netfilter/ipset/ip_set_hash_netiface.c: note: in included file:
>> net/netfilter/ipset/ip_set_hash_gen.h:435:19: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct hbucket *n @@     got struct hbucket [noderef] __rcu * @@
   net/netfilter/ipset/ip_set_hash_gen.h:435:19: sparse:     expected struct hbucket *n
   net/netfilter/ipset/ip_set_hash_gen.h:435:19: sparse:     got struct hbucket [noderef] __rcu *
>> net/netfilter/ipset/ip_set_hash_gen.h:455:35: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected struct htable *t @@     got struct htable [noderef] __rcu *table @@
   net/netfilter/ipset/ip_set_hash_gen.h:455:35: sparse:     expected struct htable *t
   net/netfilter/ipset/ip_set_hash_gen.h:455:35: sparse:     got struct htable [noderef] __rcu *table
   net/netfilter/ipset/ip_set_hash_netiface.c: note: in included file:
>> net/netfilter/ipset/ip_set_hash_gen.h:435:19: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct hbucket *n @@     got struct hbucket [noderef] __rcu * @@
   net/netfilter/ipset/ip_set_hash_gen.h:435:19: sparse:     expected struct hbucket *n
   net/netfilter/ipset/ip_set_hash_gen.h:435:19: sparse:     got struct hbucket [noderef] __rcu *
>> net/netfilter/ipset/ip_set_hash_gen.h:455:35: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected struct htable *t @@     got struct htable [noderef] __rcu *table @@
   net/netfilter/ipset/ip_set_hash_gen.h:455:35: sparse:     expected struct htable *t
   net/netfilter/ipset/ip_set_hash_gen.h:455:35: sparse:     got struct htable [noderef] __rcu *table
--
   net/netfilter/ipset/ip_set_hash_netport.c: note: in included file:
>> net/netfilter/ipset/ip_set_hash_gen.h:435:19: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct hbucket *n @@     got struct hbucket [noderef] __rcu * @@
   net/netfilter/ipset/ip_set_hash_gen.h:435:19: sparse:     expected struct hbucket *n
   net/netfilter/ipset/ip_set_hash_gen.h:435:19: sparse:     got struct hbucket [noderef] __rcu *
>> net/netfilter/ipset/ip_set_hash_gen.h:455:35: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected struct htable *t @@     got struct htable [noderef] __rcu *table @@
   net/netfilter/ipset/ip_set_hash_gen.h:455:35: sparse:     expected struct htable *t
   net/netfilter/ipset/ip_set_hash_gen.h:455:35: sparse:     got struct htable [noderef] __rcu *table
   net/netfilter/ipset/ip_set_hash_netport.c: note: in included file:
>> net/netfilter/ipset/ip_set_hash_gen.h:435:19: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct hbucket *n @@     got struct hbucket [noderef] __rcu * @@
   net/netfilter/ipset/ip_set_hash_gen.h:435:19: sparse:     expected struct hbucket *n
   net/netfilter/ipset/ip_set_hash_gen.h:435:19: sparse:     got struct hbucket [noderef] __rcu *
>> net/netfilter/ipset/ip_set_hash_gen.h:455:35: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected struct htable *t @@     got struct htable [noderef] __rcu *table @@
   net/netfilter/ipset/ip_set_hash_gen.h:455:35: sparse:     expected struct htable *t
   net/netfilter/ipset/ip_set_hash_gen.h:455:35: sparse:     got struct htable [noderef] __rcu *table
--
   net/netfilter/ipset/ip_set_hash_net.c: note: in included file:
>> net/netfilter/ipset/ip_set_hash_gen.h:435:19: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct hbucket *n @@     got struct hbucket [noderef] __rcu * @@
   net/netfilter/ipset/ip_set_hash_gen.h:435:19: sparse:     expected struct hbucket *n
   net/netfilter/ipset/ip_set_hash_gen.h:435:19: sparse:     got struct hbucket [noderef] __rcu *
>> net/netfilter/ipset/ip_set_hash_gen.h:455:35: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected struct htable *t @@     got struct htable [noderef] __rcu *table @@
   net/netfilter/ipset/ip_set_hash_gen.h:455:35: sparse:     expected struct htable *t
   net/netfilter/ipset/ip_set_hash_gen.h:455:35: sparse:     got struct htable [noderef] __rcu *table
   net/netfilter/ipset/ip_set_hash_net.c: note: in included file:
>> net/netfilter/ipset/ip_set_hash_gen.h:435:19: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct hbucket *n @@     got struct hbucket [noderef] __rcu * @@
   net/netfilter/ipset/ip_set_hash_gen.h:435:19: sparse:     expected struct hbucket *n
   net/netfilter/ipset/ip_set_hash_gen.h:435:19: sparse:     got struct hbucket [noderef] __rcu *
>> net/netfilter/ipset/ip_set_hash_gen.h:455:35: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected struct htable *t @@     got struct htable [noderef] __rcu *table @@
   net/netfilter/ipset/ip_set_hash_gen.h:455:35: sparse:     expected struct htable *t
   net/netfilter/ipset/ip_set_hash_gen.h:455:35: sparse:     got struct htable [noderef] __rcu *table
--
   net/netfilter/ipset/ip_set_hash_ipportnet.c: note: in included file:
>> net/netfilter/ipset/ip_set_hash_gen.h:435:19: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct hbucket *n @@     got struct hbucket [noderef] __rcu * @@
   net/netfilter/ipset/ip_set_hash_gen.h:435:19: sparse:     expected struct hbucket *n
   net/netfilter/ipset/ip_set_hash_gen.h:435:19: sparse:     got struct hbucket [noderef] __rcu *
>> net/netfilter/ipset/ip_set_hash_gen.h:455:35: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected struct htable *t @@     got struct htable [noderef] __rcu *table @@
   net/netfilter/ipset/ip_set_hash_gen.h:455:35: sparse:     expected struct htable *t
   net/netfilter/ipset/ip_set_hash_gen.h:455:35: sparse:     got struct htable [noderef] __rcu *table
   net/netfilter/ipset/ip_set_hash_ipportnet.c: note: in included file:
>> net/netfilter/ipset/ip_set_hash_gen.h:435:19: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct hbucket *n @@     got struct hbucket [noderef] __rcu * @@
   net/netfilter/ipset/ip_set_hash_gen.h:435:19: sparse:     expected struct hbucket *n
   net/netfilter/ipset/ip_set_hash_gen.h:435:19: sparse:     got struct hbucket [noderef] __rcu *
>> net/netfilter/ipset/ip_set_hash_gen.h:455:35: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected struct htable *t @@     got struct htable [noderef] __rcu *table @@
   net/netfilter/ipset/ip_set_hash_gen.h:455:35: sparse:     expected struct htable *t
   net/netfilter/ipset/ip_set_hash_gen.h:455:35: sparse:     got struct htable [noderef] __rcu *table

vim +435 net/netfilter/ipset/ip_set_hash_gen.h

   426	
   427	/* Destroy the hashtable part of the set */
   428	static void
   429	mtype_ahash_destroy(struct ip_set *set, struct htable *t, bool ext_destroy)
   430	{
   431		struct hbucket *n;
   432		u32 i;
   433	
   434		for (i = 0; i < jhash_size(t->htable_bits); i++) {
 > 435			n = hbucket(t, i);
   436			if (!n)
   437				continue;
   438			if (set->extensions & IPSET_EXT_DESTROY && ext_destroy)
   439				mtype_ext_cleanup(set, n);
   440			/* FIXME: use slab cache */
   441			kfree(n);
   442		}
   443	
   444		ip_set_free(t->hregion);
   445		ip_set_free(t);
   446	}
   447	
   448	/* Destroy a hash type of set */
   449	static void
   450	mtype_destroy(struct ip_set *set)
   451	{
   452		struct htype *h = set->data;
   453		struct list_head *l, *lt;
   454	
 > 455		mtype_ahash_destroy(set, h->table, true);
   456		list_for_each_safe(l, lt, &h->ad) {
   457			list_del(l);
   458			kfree(l);
   459		}
   460		kfree(h);
   461	
   462		set->data = NULL;
   463	}
   464	

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




[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux