From: adobriyan@gmail.com (Alexey Dobriyan)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] mfd/ab8500: Use kstrtoul_from_user
Date: Mon, 20 Jun 2011 16:45:46 +0300 [thread overview]
Message-ID: <BANLkTikKRVP4PW48YtR+mMMNsaxTDxoGtw@mail.gmail.com> (raw)
In-Reply-To: <1307393012-32582-2-git-send-email-peterhuewe@gmx.de>
NAK
You should use kstrtou8_from_user() and drop 0xff check as well.
Do NOT blindly replace strict_strtoul with kstrtoul.
On Mon, Jun 6, 2011 at 11:43 PM, Peter Huewe <peterhuewe@gmx.de> wrote:
> - ? ? ? err = strict_strtoul(buf, 0, &user_val);
> + ? ? ? err = kstrtoul_from_user(user_buf, count, 0, &user_val);
> ? ? ? ?if (err)
> - ? ? ? ? ? ? ? return -EINVAL;
> + ? ? ? ? ? ? ? return err;
> +
> ? ? ? ?if (user_val > 0xff) {
> ? ? ? ? ? ? ? ?dev_err(dev, "debugfs error input > 0xff\n");
> ? ? ? ? ? ? ? ?return -EINVAL;
next prev parent reply other threads:[~2011-06-20 13:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-06 20:43 [PATCH 1/2] mfd/ab3550: Use kstrtoul_from_user Peter Huewe
2011-06-06 20:43 ` [PATCH 2/2] mfd/ab8500: " Peter Huewe
2011-06-20 13:45 ` Alexey Dobriyan [this message]
2011-06-20 19:46 ` Peter Hüwe
2011-06-20 19:46 ` [PATCH 1/2 v2] mfd/ab3550: Convert to kstrtou8_from_user Peter Huewe
2011-06-20 19:50 ` Alexey Dobriyan
2011-06-20 20:16 ` Peter Hüwe
2011-06-20 21:01 ` [PATCH 1/2 v3] " Peter Huewe
2011-06-20 21:01 ` [PATCH 2/2 v4] mfd/ab8500: " Peter Huewe
2011-06-20 19:46 ` [PATCH 2/2 v2] " Peter Huewe
2011-06-20 19:51 ` [PATCH v3] " Peter Huewe
2011-06-20 13:29 ` [PATCH 1/2] mfd/ab3550: Use kstrtoul_from_user Samuel Ortiz
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=BANLkTikKRVP4PW48YtR+mMMNsaxTDxoGtw@mail.gmail.com \
--to=adobriyan@gmail.com \
--cc=linux-arm-kernel@lists.infradead.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).