lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACRpkdY7CsP_hFq3p4tzzMxU0rykrwKu_EmWJ2KBqEU=Rz0KZw@mail.gmail.com>
Date:   Tue, 20 Jun 2017 11:33:04 +0200
From:   Linus Walleij <linus.walleij@...aro.org>
To:     fenglinw@...eaurora.org,
        Bjorn Andersson <bjorn.andersson@...aro.org>
Cc:     "linux-arm-msm@...r.kernel.org" <linux-arm-msm@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Andy Gross <andy.gross@...aro.org>,
        David Brown <david.brown@...aro.org>,
        "open list:ARM/QUALCOMM SUPPORT" <linux-soc@...r.kernel.org>,
        "linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
        collinsd@...cinc.com, aghayal@....qualcomm.com, wruan@...cinc.com,
        kgunda@....qualcomm.com
Subject: Re: [PATCH V1 3/3] pinctrl: qcom: spmi-gpio: Correct power_source
 range check

On Tue, Jun 13, 2017 at 8:16 AM,  <fenglinw@...eaurora.org> wrote:

> From: Fenglin Wu <fenglinw@...eaurora.org>
>
> Power source selection in DIG_VIN_CTL is indexed from 0, in the range
> check it shouldn't be equal to the total number of power sources.
>
> Signed-off-by: Fenglin Wu <fenglinw@...eaurora.org>
> ---
>  drivers/pinctrl/qcom/pinctrl-spmi-gpio.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c b/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
> index 581309d..1fd677c 100644
> --- a/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
> +++ b/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
> @@ -500,7 +500,7 @@ static int pmic_gpio_config_set(struct pinctrl_dev *pctldev, unsigned int pin,
>                         pad->is_enabled = false;
>                         break;
>                 case PIN_CONFIG_POWER_SOURCE:
> -                       if (arg > pad->num_sources)
> +                       if (arg >= pad->num_sources)
>                                 return -EINVAL;
>                         pad->power_source = arg;
>                         break;

Björn can you ACK this?

Yours,
Linus Walleij

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ