lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202507130021.ovxzu4FO-lkp@intel.com>
Date: Sun, 13 Jul 2025 01:14:12 +0800
From: kernel test robot <lkp@...el.com>
To: Kuniyuki Iwashima <kuniyu@...gle.com>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	David Ahern <dsahern@...nel.org>
Cc: oe-kbuild-all@...ts.linux.dev, netdev@...r.kernel.org,
	Simon Horman <horms@...nel.org>,
	Kuniyuki Iwashima <kuniyu@...gle.com>
Subject: Re: [PATCH v1 net-next 06/14] neighbour: Free pneigh_entry after RCU
 grace period.

Hi Kuniyuki,

kernel test robot noticed the following build warnings:

[auto build test WARNING on net-next/main]

url:    https://github.com/intel-lab-lkp/linux/commits/Kuniyuki-Iwashima/neighbour-Make-neigh_valid_get_req-return-ndmsg/20250712-031447
base:   net-next/main
patch link:    https://lore.kernel.org/r/20250711191007.3591938-7-kuniyu%40google.com
patch subject: [PATCH v1 net-next 06/14] neighbour: Free pneigh_entry after RCU grace period.
config: csky-randconfig-r111-20250712 (https://download.01.org/0day-ci/archive/20250713/202507130021.ovxzu4FO-lkp@intel.com/config)
compiler: csky-linux-gcc (GCC) 15.1.0
reproduce: (https://download.01.org/0day-ci/archive/20250713/202507130021.ovxzu4FO-lkp@intel.com/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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202507130021.ovxzu4FO-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> net/core/neighbour.c:860:33: sparse: sparse: incompatible types in comparison expression (different address spaces):
   net/core/neighbour.c:860:33: sparse:    struct pneigh_entry [noderef] __rcu *
   net/core/neighbour.c:860:33: sparse:    struct pneigh_entry *
   net/core/neighbour.c:806:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   net/core/neighbour.c:806:9: sparse:    struct pneigh_entry [noderef] __rcu *
   net/core/neighbour.c:806:9: sparse:    struct pneigh_entry *
   net/core/neighbour.c:832:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
   net/core/neighbour.c:832:25: sparse:    struct pneigh_entry [noderef] __rcu *
   net/core/neighbour.c:832:25: sparse:    struct pneigh_entry *
   net/core/neighbour.c:445:9: sparse: sparse: context imbalance in '__neigh_ifdown' - wrong count at exit
   net/core/neighbour.c:869:9: sparse: sparse: context imbalance in 'pneigh_ifdown_and_unlock' - unexpected unlock

vim +860 net/core/neighbour.c

   845	
   846	static void pneigh_ifdown_and_unlock(struct neigh_table *tbl,
   847					     struct net_device *dev,
   848					     bool skip_perm)
   849	{
   850		struct pneigh_entry *n, **np;
   851		LIST_HEAD(head);
   852		u32 h;
   853	
   854		for (h = 0; h <= PNEIGH_HASHMASK; h++) {
   855			np = &tbl->phash_buckets[h];
   856			while ((n = *np) != NULL) {
   857				if (skip_perm && n->permanent)
   858					goto skip;
   859				if (!dev || n->dev == dev) {
 > 860					rcu_assign_pointer(*np, n->next);
   861					list_add(&n->free_node, &head);
   862					continue;
   863				}
   864	skip:
   865				np = &n->next;
   866			}
   867		}
   868	
   869		write_unlock_bh(&tbl->lock);
   870	
   871		while (!list_empty(&head)) {
   872			n = list_first_entry(&head, typeof(*n), free_node);
   873			list_del(&n->free_node);
   874	
   875			if (tbl->pdestructor)
   876				tbl->pdestructor(n);
   877	
   878			call_rcu(&n->rcu, pneigh_destroy);
   879		}
   880	}
   881	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ