lkml.org 
[lkml]   [2010]   [May]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH tip/core/rcu 28/48] net: Make accesses to ->br_port safe for sparse RCU
Date
On Tuesday 04 May 2010 23:26:31 Stephen Hemminger 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.
> >
>
> I would rather make the bridge hook generic and not take a type argument.

Not sure if you were confused by the comment in the same way that I was.

The bridge hook is not impacted by this at all, since we can either pass
a void* or a struct net_bridge_port* to it. The br_port() helper
is used for all the places where we actually want to dereference
dev->br_port and access its contents.

Arnd


\
 
 \ /
  Last update: 2010-05-04 23:45    [W:0.062 / U:7.008 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site