fix error handle in ip_mc_add_src()
Subsystems (3)
PATCH v2 1/1 fix error handle in ip_mc_add_src()
from: Jun Zhao <[email protected]>
When add sources to interface failure, need to roll back the sfcount[MODE] to before state. We need to match it corresponding.
---
net/ipv4/igmp.c +2 -1
@@ -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 ; j<i; j++) (void )ip_mc_del1_src (pmc, sfmode, &psfsrc[j]); }else if (isexclude != (pmc->sfcount[MCAST_EXCLUDE ] !=0 )) {
David Miller
maintainerFrom: Jun Zhao <[email protected]>
Date: Tue, 22 Nov 2011 00:05:16 +0800
Quoted 8 lines
from: Jun Zhao <[email protected]>
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 <[email protected]>Acked-by Eric Dumazet <[email protected]>Signed-off-by Jun Zhao <[email protected]>
Please use an appropriate prefix in your subject line after the closing "]" bracket. For example, something like "ipv4: " for this specific patch is fine.
Your patch has also been corrupted by your email client, it turned tab characters into spaces amongst other things. Please correct this, email a test patch to yourself, and make absolutely sure you are able to successfully apply it before you retry submitting your fix here.
Thank you.
Quoted 16 lines · David Miller
From: Jun Zhao <[email protected]>
Date: Tue, 22 Nov 2011 00:05:16 +0800Quoted 8 lines
from: Jun Zhao <[email protected]>
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 <[email protected]>Acked-by Eric Dumazet <[email protected]>Signed-off-by Jun Zhao <[email protected]>Please use an appropriate prefix in your subject line after the closing "]" bracket. For example, something like "ipv4: " for this specific patch is fine.
Quoted 6 lines
Your patch has also been corrupted by your email client, it turned tab characters into spaces amongst other things. Please correct this, email a test patch to yourself, and make absolutely sure you are able to successfully apply it before you retry submitting your fix here.
Thank you.
Ok, I will double-check this according to your comments, after that, re-submit the patch, Tks.
Jun Zhao said, at 2011/11/22 0:05:
Quoted 14 lines
from: Jun Zhao<[email protected]>
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<[email protected]>Acked-by Eric Dumazet<[email protected]>Signed-off-by Jun Zhao<[email protected]>---
net/ipv4/igmp.c +0
-0
net/ipv4/igmp.c static int ip_mc_add_src(struct in_device *in_dev, __be32 *pmca, int sfmode, · line 1720
Quoted 6 lines
net/ipv4/igmp.c +2
-1@@ -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]--;
Tab is changed to space by your email client.
David Miller
maintainerFrom: ShanWei <[email protected]>
Date: Wed, 23 Nov 2011 16:25:01 +0800
Quoted 1 line
Tab is changed to space by your email client.
He knows, that's why he posted v3 already.
:-)