Re: [PATCH RFC tip/core/rcu 04/23] net: Make accesses to ->br_port safe for sparse RCU

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Paul E. McKenney
Date: Wednesday, May 12, 2010 - 3:35 pm

On Wed, May 12, 2010 at 02:44:53PM -0700, Stephen Hemminger wrote:

Fair point!


OK.

The reason for br_port() is to allow ->br_port to be a void*.  If we
eliminate br_port(), then it is necessary to make the definition of the
struct net_bridge_port available everywhere that ->br_port is given to
rcu_dereference().  The reason for this is that Arnd's sparse-based RCU
checking code uses __rcu to tag the data pointed to by an RCU-protected
pointer.  This in turn means that rcu_dereference() and friends must
now have access to the pointed-to type, as is done in patch 6 in this
series.

One way to make struct net_bridge_port available is to put:

	#include "../../net/bridge/br_private.h"

in include/linux/netdevice.h.

However, when I try this, I get lots of build errors, which was what led
us to the path of making ->br_port be a void*, thus requiring the br_port()
helper function in cases where the caller needs the underlying type.

What should we be doing instead?

							Thanx, Paul
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH RFC tip/core/rcu 08/23] cgroups: __rcu annotations, Paul E. McKenney, (Wed May 12, 2:33 pm)
[PATCH RFC tip/core/rcu 09/23] credentials: rcu annotation, Paul E. McKenney, (Wed May 12, 2:33 pm)
[PATCH RFC tip/core/rcu 10/23] keys: __rcu annotations, Paul E. McKenney, (Wed May 12, 2:33 pm)
[PATCH RFC tip/core/rcu 11/23] nfs: __rcu annotations, Paul E. McKenney, (Wed May 12, 2:33 pm)
[PATCH RFC tip/core/rcu 12/23] net: __rcu annotations for ..., Paul E. McKenney, (Wed May 12, 2:33 pm)
[PATCH RFC tip/core/rcu 13/23] perf_event: __rcu annotations, Paul E. McKenney, (Wed May 12, 2:33 pm)
[PATCH RFC tip/core/rcu 14/23] notifiers: __rcu annotations, Paul E. McKenney, (Wed May 12, 2:33 pm)
[PATCH RFC tip/core/rcu 15/23] radix-tree: __rcu annotations, Paul E. McKenney, (Wed May 12, 2:33 pm)
[PATCH RFC tip/core/rcu 16/23] idr: __rcu annotations, Paul E. McKenney, (Wed May 12, 2:33 pm)
[PATCH RFC tip/core/rcu 17/23] input: __rcu annotations, Paul E. McKenney, (Wed May 12, 2:33 pm)
[PATCH RFC tip/core/rcu 19/23] kvm: add __rcu annotations, Paul E. McKenney, (Wed May 12, 2:33 pm)
[PATCH RFC tip/core/rcu 20/23] kernel: __rcu annotations, Paul E. McKenney, (Wed May 12, 2:33 pm)
[PATCH RFC tip/core/rcu 21/23] net: __rcu annotations, Paul E. McKenney, (Wed May 12, 2:33 pm)
[PATCH RFC tip/core/rcu 22/23] kvm: more __rcu annotations, Paul E. McKenney, (Wed May 12, 2:33 pm)
[PATCH RFC tip/core/rcu 23/23] vhost: add __rcu annotations, Paul E. McKenney, (Wed May 12, 2:33 pm)
Re: [PATCH RFC tip/core/rcu 04/23] net: Make accesses to - ..., Stephen Hemminger, (Wed May 12, 2:44 pm)
Re: [PATCH RFC tip/core/rcu 23/23] vhost: add __rcu annota ..., Michael S. Tsirkin, (Wed May 12, 2:48 pm)
Re: [PATCH RFC tip/core/rcu 04/23] net: Make accesses to - ..., Paul E. McKenney, (Wed May 12, 3:35 pm)
Re: [PATCH RFC tip/core/rcu 04/23] net: Make accesses to - ..., Stephen Hemminger, (Wed May 12, 6:33 pm)
Re: [PATCH RFC tip/core/rcu 23/23] vhost: add __rcu annota ..., Michael S. Tsirkin, (Wed May 12, 8:53 pm)
Re: [PATCH RFC tip/core/rcu 23/23] vhost: add __rcu annota ..., Michael S. Tsirkin, (Wed May 12, 9:50 pm)
Re: [PATCH RFC tip/core/rcu 17/23] input: __rcu annotations, Dmitry Torokhov, (Thu May 13, 12:40 am)
Re: [PATCH RFC tip/core/rcu 23/23] vhost: add __rcu annota ..., Paul E. McKenney, (Thu May 13, 12:55 pm)
Re: [PATCH RFC tip/core/rcu 02/23] rcu: add __rcu API for ..., Paul E. McKenney, (Thu May 13, 2:48 pm)
Re: [PATCH RFC tip/core/rcu 23/23] vhost: add __rcu annota ..., Michael S. Tsirkin, (Mon May 17, 1:33 pm)
Re: [PATCH RFC tip/core/rcu 23/23] vhost: add __rcu annota ..., Mathieu Desnoyers, (Mon May 17, 3:00 pm)
Re: [PATCH RFC tip/core/rcu 23/23] vhost: add __rcu annota ..., Michael S. Tsirkin, (Mon May 17, 4:08 pm)
Re: [PATCH RFC tip/core/rcu 23/23] vhost: add __rcu annota ..., Mathieu Desnoyers, (Mon May 17, 4:40 pm)
Re: [PATCH RFC tip/core/rcu 23/23] vhost: add __rcu annota ..., Mathieu Desnoyers, (Mon May 17, 6:35 pm)
Re: [PATCH RFC tip/core/rcu 23/23] vhost: add __rcu annota ..., Michael S. Tsirkin, (Tue May 18, 7:25 am)
Re: [PATCH RFC tip/core/rcu 23/23] vhost: add __rcu annota ..., Mathieu Desnoyers, (Tue May 18, 7:47 am)