From: "Matt Carlson" <mcarlson@broadcom.com>
To: "Michael Chan" <mchan@broadcom.com>
Cc: "Matthew Carlson" <mcarlson@broadcom.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [RFC] Validate ethtool autoneg before relaying
Date: Wed, 26 Nov 2008 15:44:06 -0800 [thread overview]
Message-ID: <20081126234406.GA8970@xw6200.broadcom.net> (raw)
In-Reply-To: <1227742092.13189.19.camel@HP1>
On Wed, Nov 26, 2008 at 03:28:12PM -0800, Michael Chan wrote:
>
> On Wed, 2008-11-26 at 14:17 -0800, Matt Carlson wrote:
> > diff --git a/net/core/ethtool.c b/net/core/ethtool.c
> > index 14ada53..6362f56 100644
> > --- a/net/core/ethtool.c
> > +++ b/net/core/ethtool.c
> > @@ -164,6 +164,9 @@ static int ethtool_set_settings(struct net_device *dev, void __user *useraddr)
> > if (copy_from_user(&cmd, useraddr, sizeof(cmd)))
> > return -EFAULT;
> >
> > + if (cmd.autoneg != AUTONEG_ENABLE && cmd.autoneg != AUTONEG_DISABLE)
> > + return -EFAULT;
> > +
>
> Matt, you should return -EINVAL here instead.
Yes. You are right. I'll fix this in a revised patch if everyone
decides this is an effort worth pursuing.
> > return dev->ethtool_ops->set_settings(dev, &cmd);
> > }
> >
>
next prev parent reply other threads:[~2008-11-26 23:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-26 22:17 [RFC] Validate ethtool autoneg before relaying Matt Carlson
2008-11-26 23:28 ` Michael Chan
2008-11-26 23:44 ` Matt Carlson [this message]
2008-11-27 8:07 ` 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=20081126234406.GA8970@xw6200.broadcom.net \
--to=mcarlson@broadcom.com \
--cc=mchan@broadcom.com \
--cc=netdev@vger.kernel.org \
/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).