linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] ewrk3: range checking problem
@ 2010-03-22 12:07 Dan Carpenter
  2010-03-23  1:33 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2010-03-22 12:07 UTC (permalink / raw)
  To: netdev
  Cc: Stephen Hemminger, Patrick McHardy, Jiri Pirko, Alexey Dobriyan,
	linux-kernel, kernel-janitors, David S. Miller

The range checking here is wrong.  It should be HASH_TABLE_LEN which 
is 512.

Signed-off-by: Dan Carpenter <error27@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;
 			}

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [patch] ewrk3: range checking problem
  2010-03-22 12:07 [patch] ewrk3: range checking problem Dan Carpenter
@ 2010-03-23  1:33 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2010-03-23  1:33 UTC (permalink / raw)
  To: error27
  Cc: netdev, shemminger, kaber, jpirko, adobriyan, linux-kernel,
	kernel-janitors

From: Dan Carpenter <error27@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 <error27@gmail.com>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-03-23  1:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-22 12:07 [patch] ewrk3: range checking problem Dan Carpenter
2010-03-23  1:33 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).