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]
Message-ID: <16dfaab2-bce5-6f07-7c18-d568f4719d75@gmx.de>
Date:   Tue, 2 Aug 2022 10:35:27 +0200
From:   Helge Deller <deller@....de>
To:     studentxswpy@....com, James.Bottomley@...senPartnership.com,
        dmitry.torokhov@...il.com, linux-parisc@...r.kernel.org,
        linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:     Hacash Robot <hacashRobot@...tino.com>
Subject: Re: [PATCH] Input: check the return value of ioremap() in
 gscps2_probe()

On 8/2/22 09:20, studentxswpy@....com wrote:
> From: Xie Shaowen <studentxswpy@....com>
>
> The function ioremap() in gscps2_probe() can fail, so
> its return value should be checked.
>
> Fixes: 4bdc0d676a643 ("remove ioremap_nocache and devm_ioremap_nocache")
> Reported-by: Hacash Robot <hacashRobot@...tino.com>
> Signed-off-by: Xie Shaowen <studentxswpy@....com>

I've applied it to the parisc git tree.

Thanks!
Helge

> ---
>  drivers/input/serio/gscps2.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/input/serio/gscps2.c b/drivers/input/serio/gscps2.c
> index a9065c6ab550..da2c67cb8642 100644
> --- a/drivers/input/serio/gscps2.c
> +++ b/drivers/input/serio/gscps2.c
> @@ -350,6 +350,10 @@ static int __init gscps2_probe(struct parisc_device *dev)
>  	ps2port->port = serio;
>  	ps2port->padev = dev;
>  	ps2port->addr = ioremap(hpa, GSC_STATUS + 4);
> +	if (!ps2port->addr) {
> +		ret = -ENOMEM;
> +		goto fail_nomem;
> +	}
>  	spin_lock_init(&ps2port->lock);
>
>  	gscps2_reset(ps2port);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ