[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100322120728.GD21571@bicker>
Date: Mon, 22 Mar 2010 15:07:28 +0300
From: Dan Carpenter <error27@...il.com>
To: netdev@...r.kernel.org
Cc: Stephen Hemminger <shemminger@...tta.com>,
Patrick McHardy <kaber@...sh.net>,
Jiri Pirko <jpirko@...hat.com>,
Alexey Dobriyan <adobriyan@...il.com>,
linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
"David S. Miller" <davem@...emloft.net>
Subject: [patch] ewrk3: range checking problem
The range checking here is wrong. It should be HASH_TABLE_LEN which
is 512.
Signed-off-by: Dan Carpenter <error27@...il.com>
diff --git a/drivers/net/ewrk3.c b/drivers/net/ewrk3.c
index 91e59f3..ae02de1 100644
--- a/drivers/net/ewrk3.c
+++ b/drivers/net/ewrk3.c
@@ -1776,8 +1776,7 @@ static int ewrk3_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
break;
case EWRK3_SET_MCA: /* Set a multicast address */
if (capable(CAP_NET_ADMIN)) {
- if (ioc->len > 1024)
- {
+ if (ioc->len > HASH_TABLE_LEN) {
status = -EINVAL;
break;
}
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists