Re: [PATCH 2/2] mfd/ab8500: Use kstrtoul_from_user

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx> 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;
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux