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:   Mon, 7 Aug 2023 17:38:50 +0200
From:   Ulf Hansson <ulf.hansson@...aro.org>
To:     Wang Ming <machel@...o.com>
Cc:     Jaehoon Chung <jh80.chung@...sung.com>, linux-mmc@...r.kernel.org,
        linux-kernel@...r.kernel.org, opensource.kernel@...o.com
Subject: Re: [PATCH v2] mmc: host: Use dev_err_probe instead of dev_err

On Wed, 26 Jul 2023 at 13:50, Wang Ming <machel@...o.com> wrote:
>
> It is possible that dma_request_chan will return EPROBE_DEFER,
> which means that host->dev is not ready yet. In this case,
> dev_err(host->dev), there will be no output. This patch fixes the bug.

More exactly, what do you mean by "host->dev is not ready yet"?

Did you really test this?

Kind regards
Uffe

>
> Signed-off-by: Wang Ming <machel@...o.com>
> ---
>  drivers/mmc/host/dw_mmc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> index 829af2c98a44..5a3eefd86931 100644
> --- a/drivers/mmc/host/dw_mmc.c
> +++ b/drivers/mmc/host/dw_mmc.c
> @@ -841,9 +841,9 @@ static int dw_mci_edmac_init(struct dw_mci *host)
>
>         host->dms->ch = dma_request_chan(host->dev, "rx-tx");
>         if (IS_ERR(host->dms->ch)) {
> -               int ret = PTR_ERR(host->dms->ch);
> +               int ret = dev_err_probe(host->dev, PTR_ERR(host->dms->ch),
> +                       "Failed to get external DMA channel.\n");
>
> -               dev_err(host->dev, "Failed to get external DMA channel.\n");
>                 kfree(host->dms);
>                 host->dms = NULL;
>                 return ret;
> --
> 2.25.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ