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: <20100922231113.GR2435@linux.vnet.ibm.com>
Date:	Wed, 22 Sep 2010 16:11:13 -0700
From:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	eric.dumazet@...il.com, netdev@...r.kernel.org
Subject: Re: Fw: rcu warning

On Wed, Sep 22, 2010 at 02:47:36PM -0700, Andrew Morton wrote:
> On Wed, 22 Sep 2010 14:44:38 -0700
> "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com> wrote:
> 
> > In linux/master, there is an rcu_read_lock_bh() in the call path, but
> > an rcu_dereference() instead of an rcu_dereference_bh().  Thoughts?
> > 
> > (I have asked Andrew what kernel this is against -- I don't see the
> > rcu_read_lock() that I would expect to see in the lockdep output.)
> 
> current linux-next.

Thank you!!!

OK, here we have __in_dev_get_rtnl() called from ip_route_output_slow().
I might be missing something, but I don't see either an rcu_read_lock()
or an RTNL acquisition in ip_route_output_slow().

But the call to __in_dev_get_rtnl() simply compares to NULL, so I don't
understand why this can't instead call __in_dev_get_rcu().  Given that
there are a number of places where the return value from __in_dev_get_rtnl()
is compared to NULL, one approach would be to have something like the
following:

	static inline int __in_dev_check_null(const struct net_device *dev)
	{
		return rcu_dereference_raw(dev->ip_ptr) == NULL;
	}

Thoughts?

							Thanx, Paul
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ