linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* mutex and rcu list traversal idiosyncrasy
@ 2018-09-13 11:55 Håkon Bugge
  2018-09-14 23:46 ` Shiraz Saleem
  0 siblings, 1 reply; 2+ messages in thread
From: Håkon Bugge @ 2018-09-13 11:55 UTC (permalink / raw)
  To: faisal.latif, shiraz.saleem
  Cc: OFED mailing list, linux-kernel, Doug Ledford, Sean Hefty,
	Hal Rosenstock, anjali.singhai, Shannon Nelson

Hi Faisal,


In commit f27b4746f378 ("i40iw: add connection management code") you have in i40iw_add_mqh_6():

rtnl_lock();
for_each_netdev_rcu(...) {
	[]
}
rtnl_unlock();

Shouldn't this read:

rtnl_lock();
for_each_netdev(...) {
	[]
}
rtnl_unlock();

or

rcu_read_lock();
for_each_netdev_rcu(...) {
	[]
}
rcu_read_unlock();


?



Thx, Håkon



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: mutex and rcu list traversal idiosyncrasy
  2018-09-13 11:55 mutex and rcu list traversal idiosyncrasy Håkon Bugge
@ 2018-09-14 23:46 ` Shiraz Saleem
  0 siblings, 0 replies; 2+ messages in thread
From: Shiraz Saleem @ 2018-09-14 23:46 UTC (permalink / raw)
  To: Håkon Bugge
  Cc: Latif, Faisal, OFED mailing list, linux-kernel, Doug Ledford,
	Hefty, Sean, Hal Rosenstock, Singhai, Anjali, Shannon Nelson

On Thu, Sep 13, 2018 at 05:55:44AM -0600, Håkon Bugge wrote:
> Hi Faisal,
> 
> 
> In commit f27b4746f378 ("i40iw: add connection management code") you have in i40iw_add_mqh_6():
> 
> rtnl_lock();
> for_each_netdev_rcu(...) {
> 	[]
> }
> rtnl_unlock();
> 
> Shouldn't this read:
> rtnl_lock();
> for_each_netdev(...) {
> 	[]
> }
> rtnl_unlock();
>

Yes.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-09-14 23:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-13 11:55 mutex and rcu list traversal idiosyncrasy Håkon Bugge
2018-09-14 23:46 ` Shiraz Saleem

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).