From: Guenter Roeck <guenter.roeck@ericsson.com>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] [PATCH 05/79] hwmon: (lm87) Fix vrm value range
Date: Wed, 25 Jan 2012 10:15:52 +0000 [thread overview]
Message-ID: <20120125101552.GB12670@ericsson.com> (raw)
In-Reply-To: <1327373398-997-6-git-send-email-guenter.roeck@ericsson.com>
On Wed, Jan 25, 2012 at 04:34:27AM -0500, Jean Delvare wrote:
> On Mon, 23 Jan 2012 18:48:44 -0800, Guenter Roeck wrote:
> > When updating vrm, the value range was not limited. This could result in more or
> > less random vrm values if the value provided by the user was larger than 255.
> > Fix by limiting the range to 0..255 using the SENSORS_LIMIT macro.
> >
> > Cc: Jean Delvare <khali@linux-fr.org>
> > Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
> > ---
> > drivers/hwmon/lm87.c | 2 +-
> > 1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/hwmon/lm87.c b/drivers/hwmon/lm87.c
> > index 8e66f99..2aa5e1a 100644
> > --- a/drivers/hwmon/lm87.c
> > +++ b/drivers/hwmon/lm87.c
> > @@ -604,7 +604,7 @@ static ssize_t set_vrm(struct device *dev, struct device_attribute *attr,
> > err = kstrtoul(buf, 10, &val);
> > if (err)
> > return err;
> > - data->vrm = val;
> > + data->vrm = SENSORS_LIMIT(val, 0, 255);
> > return count;
> > }
> > static DEVICE_ATTR(vrm, S_IRUGO | S_IWUSR, show_vrm, set_vrm);
>
> Same concerns here as in it87, of course. I suggest you withdraw these
> patches for the time being.
>
Agreed, makes sense. I'll move those to my "staging" branch for now.
I have a RFC set of patches in the works for hwmon-vid, trying to start addressing
the vrm issue. We can go from there once we decided how to handle it.
Thanks,
Guenter
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
prev parent reply other threads:[~2012-01-25 10:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-24 2:48 [lm-sensors] [PATCH 05/79] hwmon: (lm87) Fix vrm value range Guenter Roeck
2012-01-25 9:34 ` Jean Delvare
2012-01-25 10:15 ` Guenter Roeck [this message]
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=20120125101552.GB12670@ericsson.com \
--to=guenter.roeck@ericsson.com \
--cc=lm-sensors@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.