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: <YYgHI3vKzD2/b7R/@iki.fi>
Date:   Sun, 7 Nov 2021 19:04:35 +0200
From:   Jarkko Sakkinen <jarkko@...nel.org>
To:     Christophe JAILLET <christophe.jaillet@...adoo.fr>
Cc:     peterhuewe@....de, jgg@...pe.ca, hao.wu@...rik.com,
        linux-integrity@...r.kernel.org, linux-kernel@...r.kernel.org,
        kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] tpm_tis: Fix an error handling path in
 'tpm_tis_core_init()'

On Sat, Nov 06, 2021 at 05:42:04PM +0100, Christophe JAILLET wrote:
> Commit 79ca6f74dae0 ("tpm: fix Atmel TPM crash caused by too frequent
> queries") has moved some code around without updating the error handling
> path.
> 
> This is now pointless to 'goto out_err' when neither 'clk_enable()' nor
> 'ioremap()' have been called yet.
> 
> Make a direct return instead to avoid undoing things that have not been
> done.
> 
> Fixes: 79ca6f74dae0 ("tpm: fix Atmel TPM crash caused by too frequent queries")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
> ---
>  drivers/char/tpm/tpm_tis_core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/char/tpm/tpm_tis_core.c b/drivers/char/tpm/tpm_tis_core.c
> index b2659a4c4016..e672d2dc8937 100644
> --- a/drivers/char/tpm/tpm_tis_core.c
> +++ b/drivers/char/tpm/tpm_tis_core.c
> @@ -952,7 +952,7 @@ int tpm_tis_core_init(struct device *dev, struct tpm_tis_data *priv, int irq,
>  
>  	rc = tpm_tis_read32(priv, TPM_DID_VID(0), &vendor);
>  	if (rc < 0)
> -		goto out_err;
> +		return rc;
>  
>  	priv->manufacturer_id = vendor;
>  
> -- 
> 2.30.2
> 

Thank you.

Reviewed-by: Jarkko Sakkinen <jarkko@...nel.org>

/Jarkko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ