[PATCH RFC 1/5] net: rtnetlink: Fix incorrect RCU API usage

2019-02-20 Thread Joel Fernandes (Google)
rtnl_register_internal() and rtnl_unregister_all tries to directly dereference an RCU protected pointed outside RCU read side section. While this is Ok to do since a lock is held, let us use the correct API to avoid programmer bugs in the future. This also fixes sparse warnings arising from not

Re: [RFC 1/5] net: rtnetlink: Fix incorrect RCU API usage

2019-02-20 Thread Joel Fernandes
On Wed, Feb 20, 2019 at 08:40:34AM -0800, Paul E. McKenney wrote: > On Tue, Feb 19, 2019 at 11:08:23PM -0500, Joel Fernandes (Google) wrote: > > From: Joel Fernandes > > > > rtnl_register_internal() and rtnl_unregister_all tries to directly > > dereference an RCU protected pointed outside RCU

Re: [RFC 1/5] net: rtnetlink: Fix incorrect RCU API usage

2019-02-20 Thread Paul E. McKenney
On Tue, Feb 19, 2019 at 11:08:23PM -0500, Joel Fernandes (Google) wrote: > From: Joel Fernandes > > rtnl_register_internal() and rtnl_unregister_all tries to directly > dereference an RCU protected pointed outside RCU read side section. > While this is Ok to do since a lock is held, let us use

[RFC 1/5] net: rtnetlink: Fix incorrect RCU API usage

2019-02-19 Thread Joel Fernandes (Google)
From: Joel Fernandes rtnl_register_internal() and rtnl_unregister_all tries to directly dereference an RCU protected pointed outside RCU read side section. While this is Ok to do since a lock is held, let us use the correct API to avoid programmer bugs in the future. This also fixes sparse