lkml.org 
[lkml]   [2007]   [Feb]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: PATCH? net/bridge/br_if.c: fix use after free in port_carrier_check()
Date

Oleg Nesterov <oleg@tv-sign.ru> 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? And does anything actually pay
attention to the refcount on dev? I assume not...

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

Looks reasonable. I like it.

Acked-By: David Howells <dhowells@redhat.com>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-02-20 11:47    [W:0.079 / U:0.404 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site