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: <20241107053946.1252382-1-gnaaman@drivenets.com>
Date: Thu,  7 Nov 2024 05:39:46 +0000
From: Gilad Naaman <gnaaman@...venets.com>
To: kuniyu@...zon.com
Cc: davem@...emloft.net,
	edumazet@...gle.com,
	gnaaman@...venets.com,
	kuba@...nel.org,
	netdev@...r.kernel.org,
	pabeni@...hat.com
Subject: Re: [PATCH net-next v8 4/6] neighbour: Convert iteration to use hlist+macro

> > diff --git a/include/net/neighbour.h b/include/net/neighbour.h
> > index 69aaacd1419f..68b1970d9045 100644
> > --- a/include/net/neighbour.h
> > +++ b/include/net/neighbour.h
> > @@ -309,12 +309,9 @@ static inline struct neighbour *___neigh_lookup_noref(
> >  	u32 hash_val;
> >  
> >  	hash_val = hash(pkey, dev, nht->hash_rnd) >> (32 - nht->hash_shift);
> > -	for (n = rcu_dereference(nht->hash_buckets[hash_val]);
> > -	     n != NULL;
> > -	     n = rcu_dereference(n->next)) {
> > +	neigh_for_each_in_bucket(n, &nht->hash_heads[hash_val])
> 
> Sorry, I missed this part needs to be _rcu version.
> 
> You can keep my Reviewed-by tag in v9.
> 

No problem at all, will do.

Is it possible that the `_rcu` version will also be needed in `neigh_dump_table`?
It is called from an `rcu_read_lock`ed section, and it doesn't hold the table-lock.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ