From: Dan Carpenter <error27@gmail.com>
To: netdev@vger.kernel.org
Cc: Stephen Hemminger <shemminger@vyatta.com>,
Patrick McHardy <kaber@trash.net>, Jiri Pirko <jpirko@redhat.com>,
Alexey Dobriyan <adobriyan@gmail.com>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
"David S. Miller" <davem@davemloft.net>
Subject: [patch] ewrk3: range checking problem
Date: Mon, 22 Mar 2010 15:07:28 +0300 [thread overview]
Message-ID: <20100322120728.GD21571@bicker> (raw)
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;
}
next reply other threads:[~2010-03-22 12:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-22 12:07 Dan Carpenter [this message]
2010-03-23 1:33 ` [patch] ewrk3: range checking problem David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100322120728.GD21571@bicker \
--to=error27@gmail.com \
--cc=adobriyan@gmail.com \
--cc=davem@davemloft.net \
--cc=jpirko@redhat.com \
--cc=kaber@trash.net \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=shemminger@vyatta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).