ipv6: Check return of dev_set_allmulti
Subsystems (3)
PATCH 5/8 ipv6: Check return of dev_set_allmulti
allmulti might overflow.
Commit: "netdevice: Fix promiscuity and allmulti overflow" in net-next makes dev_set_promiscuity/allmulti return error number if overflow happened.
Here, we check the positive increment for allmulti to get error return.
--- net/ipv6/ip6mr.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
net/ipv6/ip6mr.c +5 -1
@@ -603,6 +603,7 @@ static int mif6_add(struct mif6ctl *vifc, int mrtsock)int vifi = vifc->mif6c_mifi;struct mif_device *v = &vif6_table[vifi];struct net_device *dev; +int err;/* Is vif busy ? */ if (MIF_EXISTS (vifi))
@@ -632,7 +633,10 @@ static int mif6_add(struct mif6ctl *vifc, int mrtsock)return -EINVAL ; } -dev_set_allmulti (dev,1 ); +/* Check whether allmulti overflow */ + err =dev_set_allmulti (dev,1 ); +if (err) +return err;/* * Fill in the VIF structures
Signature · 1 line
1.5.3.4
David Miller
maintainerFrom: Wang Chen <[email protected]>
Date: Fri, 20 Jun 2008 08:55:23 +0800
net/ipv6/ip6mr.c static int mif6_add(struct mif6ctl *vifc, int mrtsock) · line 639
Quoted 9 lines
net/ipv6/ip6mr.c +4
-1@@ -632,7 +633,10 @@ static int mif6_add(struct mif6ctl *vifc, int mrtsock)return -EINVAL ; } -dev_set_allmulti (dev,1 ); +/* Check whether allmulti overflow */ + err =dev_set_allmulti (dev,1 ); +if (err) +return err;
Please delete comment.
David Miller said the following on 2008-6-20 10:09:
Quoted 1 line
Please delete comment.
allmulti might overflow.
Commit: "netdevice: Fix promiscuity and allmulti overflow" in net-next makes dev_set_promiscuity/allmulti return error number if overflow happened.
Here, we check the positive increment for allmulti to get error return.
--- net/ipv6/ip6mr.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
net/ipv6/ip6mr.c +4 -1
@@ -603,6 +603,7 @@ static int mif6_add(struct mif6ctl *vifc, int mrtsock)int vifi = vifc->mif6c_mifi;struct mif_device *v = &vif6_table[vifi];struct net_device *dev; +int err;/* Is vif busy ? */ if (MIF_EXISTS (vifi))
@@ -632,7 +633,9 @@ static int mif6_add(struct mif6ctl *vifc, int mrtsock)return -EINVAL ; } -dev_set_allmulti (dev,1 ); + err =dev_set_allmulti (dev,1 ); +if (err) +return err;/* * Fill in the VIF structures
Signature · 1 line
1.5.3.4
In article <[email protected]> (at Fri, 20 Jun 2008 08:55:23 +0800), Wang Chen <[email protected]> says:
Quoted 7 lines
allmulti might overflow.
Commit: "netdevice: Fix promiscuity and allmulti overflow" in net-next makes dev_set_promiscuity/allmulti return error number if overflow happened.Here, we check the positive increment for allmulti to get error return.
Signed-off-by Wang Chen <[email protected]>
The comment is too obvious to have.
--yoshfuji
YOSHIFUJI Hideaki / 吉藤英明 said the following on 2008-6-24 11:52:
Quoted 6 lines
In article <[email protected]> (at Fri, 20 Jun 2008 08:55:23 +0800), Wang Chen <[email protected]> says:
Quoted 4 lines
allmulti might overflow.
Commit: "netdevice: Fix promiscuity and allmulti overflow" in net-next makes dev_set_promiscuity/allmulti return error number if overflow happened.
Quoted 6 lines
Quoted 3 lines
Here, we check the positive increment for allmulti to get error return.
Signed-off-by Wang Chen <[email protected]>The comment is too obvious to have.
It's just explain the background of this series of fix.