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: <8a4ae419-c5f8-fe2d-7513-faa4e24656fd@intel.com>
Date:   Wed, 7 Sep 2022 10:01:50 +0300
From:   Adrian Hunter <adrian.hunter@...el.com>
To:     Wenchao Chen <wenchao.chen666@...il.com>, ulf.hansson@...aro.org
Cc:     linux-mmc@...r.kernel.org, linux-kernel@...r.kernel.org,
        zhang.lyra@...il.com, lzx.stg@...il.com
Subject: Re: [PATCH Vx 5/5] mmc: sdhci: Fix host->cmd is null

Don't know what is going on with the "Vx 5/5"?  Ignoring it.

On 7/09/22 06:58, Wenchao Chen wrote:
> From: Wenchao Chen <wenchao.chen@...soc.com>
> 
> When data crc occurs, the kernel will panic because host->cmd is null.
> 

Fixes: efe8f5c9b5e1 ("mmc: sdhci: Capture eMMC and SD card errors")

> Signed-off-by: Wenchao Chen <wenchao.chen@...soc.com>

Cc: stable@...r.kernel.org

Acked-by: Adrian Hunter <adrian.hunter@...el.com>

Thank you!

> ---
>  drivers/mmc/host/sdhci.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> index 7689ffe..2511728 100644
> --- a/drivers/mmc/host/sdhci.c
> +++ b/drivers/mmc/host/sdhci.c
> @@ -3928,7 +3928,7 @@ bool sdhci_cqe_irq(struct sdhci_host *host, u32 intmask, int *cmd_error,
>  
>  	if (intmask & (SDHCI_INT_INDEX | SDHCI_INT_END_BIT | SDHCI_INT_CRC)) {
>  		*cmd_error = -EILSEQ;
> -		if (!mmc_op_tuning(host->cmd->opcode))
> +		if (!mmc_op_tuning(SDHCI_GET_CMD(sdhci_readw(host, SDHCI_COMMAND))))
>  			sdhci_err_stats_inc(host, CMD_CRC);
>  	} else if (intmask & SDHCI_INT_TIMEOUT) {
>  		*cmd_error = -ETIMEDOUT;
> @@ -3938,7 +3938,7 @@ bool sdhci_cqe_irq(struct sdhci_host *host, u32 intmask, int *cmd_error,
>  
>  	if (intmask & (SDHCI_INT_DATA_END_BIT | SDHCI_INT_DATA_CRC)) {
>  		*data_error = -EILSEQ;
> -		if (!mmc_op_tuning(host->cmd->opcode))
> +		if (!mmc_op_tuning(SDHCI_GET_CMD(sdhci_readw(host, SDHCI_COMMAND))))
>  			sdhci_err_stats_inc(host, DAT_CRC);
>  	} else if (intmask & SDHCI_INT_DATA_TIMEOUT) {
>  		*data_error = -ETIMEDOUT;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ