Patchwork bridge: Fix mglist corruption that leads to memory corruption

login
register
mail settings
Submitter Herbert Xu
Date Feb. 11, 2011, 10:42 p.m.
Message ID <20110211224207.GA5715@gondor.apana.org.au>
Download mbox | patch
Permalink /patch/82844/
State Accepted
Delegated to: David Miller
Headers show

Comments

Herbert Xu - Feb. 11, 2011, 10:42 p.m.
Hi:

This patch fixes a typo that is not too serious.

bridge: Fix timer typo that may render snooping less effective

In a couple of spots where we are supposed to modify the port
group timer (p->timer) we instead modify the bridge interface
group timer (mp->timer).

The effect of this is mostly harmless.  However, it can cause
port subscriptions to be longer than they should be, thus making
snooping less effective.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>


Cheers,
David Miller - Feb. 12, 2011, 5:59 a.m.
From: Herbert Xu <herbert@gondor.apana.org.au>
Date: Sat, 12 Feb 2011 09:42:07 +1100

> This patch fixes a typo that is not too serious.
> 
> bridge: Fix timer typo that may render snooping less effective

Also applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
index f701a21..802d3f8 100644
--- a/net/bridge/br_multicast.c
+++ b/net/bridge/br_multicast.c
@@ -1177,7 +1178,7 @@  static int br_ip4_multicast_query(struct net_bridge *br,
 		if (timer_pending(&p->timer) ?
 		    time_after(p->timer.expires, now + max_delay) :
 		    try_to_del_timer_sync(&p->timer) >= 0)
-			mod_timer(&mp->timer, now + max_delay);
+			mod_timer(&p->timer, now + max_delay);
 	}
 
 out:
@@ -1248,7 +1249,7 @@  static int br_ip6_multicast_query(struct net_bridge *br,
 		if (timer_pending(&p->timer) ?
 		    time_after(p->timer.expires, now + max_delay) :
 		    try_to_del_timer_sync(&p->timer) >= 0)
-			mod_timer(&mp->timer, now + max_delay);
+			mod_timer(&p->timer, now + max_delay);
 	}
 
 out: