From: Jun Zhao Date: Tue, 22 Nov 2011 17:19:03 +0000 (+0000) Subject: ipv4 : igmp : fix error handle in ip_mc_add_src() X-Git-Tag: upstream/snapshot3+hdmi~8634^2~40 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=685f94e6db8496399c881218018166515445a914;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git ipv4 : igmp : fix error handle in ip_mc_add_src() When add sources to interface failure, need to roll back the sfcount[MODE] to before state. We need to match it corresponding. Acked-by: David L Stevens Acked-by: Eric Dumazet Signed-off-by: Jun Zhao Signed-off-by: David S. Miller --- diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c index c7472ef..b2ca095 100644 --- a/net/ipv4/igmp.c +++ b/net/ipv4/igmp.c @@ -1716,7 +1716,8 @@ static int ip_mc_add_src(struct in_device *in_dev, __be32 *pmca, int sfmode, if (err) { int j; - pmc->sfcount[sfmode]--; + if (!delta) + pmc->sfcount[sfmode]--; for (j=0; jsfcount[MCAST_EXCLUDE] != 0)) {