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:   Fri, 16 Sep 2022 15:21:30 +0100
From:   Damien Le Moal <damien.lemoal@...nsource.wdc.com>
To:     Li Zhong <floridsleeves@...il.com>, linux-kernel@...r.kernel.org,
        linux-ide@...r.kernel.org
Subject: Re: [PATCH v2] ata: libata-core: Check errors in
 sata_print_link_status()

On 2022/09/04 0:10, Li Zhong wrote:
> sata_scr_read() could return negative error code on failure. Check the
> return value when reading the control register.
> 
> Signed-off-by: Li Zhong <floridsleeves@...il.com>
> ---
>  drivers/ata/libata-core.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
> index 826d41f341e4..ae08c7d35cb0 100644
> --- a/drivers/ata/libata-core.c
> +++ b/drivers/ata/libata-core.c
> @@ -3021,7 +3021,8 @@ static void sata_print_link_status(struct ata_link *link)
>  
>  	if (sata_scr_read(link, SCR_STATUS, &sstatus))
>  		return;
> -	sata_scr_read(link, SCR_CONTROL, &scontrol);
> +	if (sata_scr_read(link, SCR_CONTROL, &scontrol))
> +		return;
>  
>  	if (ata_phys_link_online(link)) {
>  		tmp = (sstatus >> 4) & 0xf;

Applied to for-6.1. Thanks.

-- 
Damien Le Moal
Western Digital Research

Powered by blists - more mailing lists