Re: [PATCH tip/core/rcu 28/48] net: Make accesses to ->br_port safefor sparse RCU

From: Stephen Hemminger
Date: Tue May 04 2010 - 17:28:33 EST


On Tue, 4 May 2010 13:19:38 -0700
"Paul E. McKenney" <paulmck@xxxxxxxxxxxxxxxxxx> wrote:

> The new versions of the rcu_dereference() APIs requires that any pointers
> passed to one of these APIs be fully defined. The ->br_port field
> in struct net_device points to a struct net_bridge_port, which is an
> incomplete type. This commit therefore changes ->br_port to be a void*,
> and introduces a br_port() helper function to convert the type to struct
> net_bridge_port, and applies this new helper function where required.
>
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
> Signed-off-by: Paul E. McKenney <paulmck@xxxxxxxxxxxxxxxxxx>
> Cc: David Miller <davem@xxxxxxxxxxxxx>
> Cc: Stephen Hemminger <shemminger@xxxxxxxxxxxxxxxxxxxx>
> Cc: Eric Dumazet <eric.dumazet@xxxxxxxxx>

I would rather make the bridge hook generic and not take a type argument.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/