diff options
author | Stephen Hemminger <shemminger@osdl.org> | 2006-03-03 20:15:34 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-03-05 00:06:21 -0500 |
commit | d32439c0d4cec5c4101477989ee8c7ee1ebfbb0e (patch) | |
tree | c28284854f8f1aa74f60ed8378c0984fbcae747e /net/bridge/br_if.c | |
parent | 6e86b89084a60355f0e1fb876ca0cfbca62ee85c (diff) |
[BRIDGE]: port timer initialization
Initialize the STP timers for a port when it is created,
rather than when it is enabled. This will prevent future race conditions
where timer gets started before port is enabled.
Signed-off-by: Stephen Hemminger <shemmigner@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge/br_if.c')
-rw-r--r-- | net/bridge/br_if.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c index 8b38c839d539..879b54ed2b4e 100644 --- a/net/bridge/br_if.c +++ b/net/bridge/br_if.c | |||
@@ -277,8 +277,9 @@ static struct net_bridge_port *new_nbp(struct net_bridge *br, | |||
277 | br_init_port(p); | 277 | br_init_port(p); |
278 | p->state = BR_STATE_DISABLED; | 278 | p->state = BR_STATE_DISABLED; |
279 | INIT_WORK(&p->carrier_check, port_carrier_check, dev); | 279 | INIT_WORK(&p->carrier_check, port_carrier_check, dev); |
280 | kobject_init(&p->kobj); | 280 | br_stp_port_timer_init(p); |
281 | 281 | ||
282 | kobject_init(&p->kobj); | ||
282 | kobject_set_name(&p->kobj, SYSFS_BRIDGE_PORT_ATTR); | 283 | kobject_set_name(&p->kobj, SYSFS_BRIDGE_PORT_ATTR); |
283 | p->kobj.ktype = &brport_ktype; | 284 | p->kobj.ktype = &brport_ktype; |
284 | p->kobj.parent = &(dev->class_dev.kobj); | 285 | p->kobj.parent = &(dev->class_dev.kobj); |