Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[patch] ewrk3: range checking problem

2 views
Skip to first unread message

Dan Carpenter

unread,
Mar 22, 2010, 8:10:03 AM3/22/10
to
The range checking here is wrong. It should be HASH_TABLE_LEN which
is 512.

Signed-off-by: Dan Carpenter <err...@gmail.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 linux-kernel" in
the body of a message to majo...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

David Miller

unread,
Mar 22, 2010, 9:40:02 PM3/22/10
to
From: Dan Carpenter <err...@gmail.com>
Date: Mon, 22 Mar 2010 15:07:28 +0300

> The range checking here is wrong. It should be HASH_TABLE_LEN which
> is 512.
>
> Signed-off-by: Dan Carpenter <err...@gmail.com>

Applied.

0 new messages