[lkml]   [2007]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: PATCH? net/bridge/br_if.c: fix use after free in port_carrier_check()
On 02/20, David Howells wrote:
> Oleg Nesterov <> wrote:
> > static void release_nbp(struct kobject *kobj)
> > {
> > struct net_bridge_port *p
> > = container_of(kobj, struct net_bridge_port, kobj);
> > +
> > + dev_put(p->dev);
> Does this need to be done with the mutex held?

I think no. At least the current code does dev_put() without mutex held.

> And does anything actually pay
> attention to the refcount on dev? I assume not...

I guess net/core/dev.c:netdev_wait_allrefs(), but not sure.

> Should you clear p->dev->br_port before calling dev_put()?

Looks like it is protected by RCU... Anyway the current code does the same.

> Looks reasonable. I like it.
> Acked-By: David Howells <>

Thanks! I'll re-send with a proper changelog later today.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2007-02-20 15:37    [W:0.064 / U:12.176 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site