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] [day] [month] [year] [list]
Date:   Wed, 9 Nov 2016 08:19:27 -0700
From:   Tony Lindgren <tony@...mide.com>
To:     Axel Haslam <ahaslam@...libre.com>
Cc:     haojian.zhuang@...aro.org, linus.walleij@...aro.org,
        khilman@...libre.com, nsekhar@...com,
        linux-arm-kernel@...ts.infradead.org, linux-omap@...r.kernel.org,
        linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] pinctrl: single: check for any error when getting rows

* Axel Haslam <ahaslam@...libre.com> [161109 07:19]:
> pinctrl_count_index_with_args returns -ENOENT not
> -EINVAL. The return check would pass, and we would
> try to kzalloc with a negative error size throwing
> a warning.
> 
> Instead of checking for -EINVAL specifically, lets
> check for any error and avoid negative size allocations.
> 
> Signed-off-by: Axel Haslam <ahaslam@...libre.com>

Thanks for fixing that:

Acked-by: Tony Lindgren <tony@...mide.com>

> ---
>  drivers/pinctrl/pinctrl-single.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c
> index 539f31c..56e22be 100644
> --- a/drivers/pinctrl/pinctrl-single.c
> +++ b/drivers/pinctrl/pinctrl-single.c
> @@ -1228,7 +1228,7 @@ static int pcs_parse_bits_in_pinctrl_entry(struct pcs_device *pcs,
>  	struct pcs_function *function;
>  
>  	rows = pinctrl_count_index_with_args(np, name);
> -	if (rows == -EINVAL)
> +	if (rows < 0)
>  		return rows;
>  
>  	npins_in_row = pcs->width / pcs->bits_per_pin;
> -- 
> 2.10.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ