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: <CAPDyKFr9Xan+FxgC4vz4KX2UfD15Eo7+TfCjD191YVC2Hv0wdw@mail.gmail.com>
Date:   Tue, 19 Jan 2021 14:37:48 +0100
From:   Ulf Hansson <ulf.hansson@...aro.org>
To:     "Peng Fan (OSS)" <peng.fan@....nxp.com>
Cc:     Adrian Hunter <adrian.hunter@...el.com>,
        Shawn Guo <shawnguo@...nel.org>,
        Sascha Hauer <s.hauer@...gutronix.de>,
        Sascha Hauer <kernel@...gutronix.de>,
        Fabio Estevam <festevam@...il.com>,
        dl-linux-imx <linux-imx@....com>,
        "linux-mmc@...r.kernel.org" <linux-mmc@...r.kernel.org>,
        Linux ARM <linux-arm-kernel@...ts.infradead.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Peng Fan <peng.fan@....com>, Bough Chen <haobo.chen@....com>,
        Alice Guo <alice.guo@....com>
Subject: Re: [PATCH] mmc: sdhci-esdhc-imx: validate pinctrl before use it

On Fri, 15 Jan 2021 at 03:55, Peng Fan (OSS) <peng.fan@....nxp.com> wrote:
>
> From: Peng Fan <peng.fan@....com>
>
> When imx_data->pinctrl is not a valid pointer, pinctrl_lookup_state
> will trigger kernel panic.
>
> When we boot Dual OS on Jailhouse hypervisor, we let the 1st Linux to
> configure pinmux ready for the 2nd OS, so the 2nd OS not have pinctrl
> settings.
>
> Similar to this commit b62eee9f804e ("mmc: sdhci-esdhc-imx: no fail when no pinctrl available").
>
> Reviewed-by: Bough Chen <haobo.chen@....com>
> Reviewed-by: Alice Guo <alice.guo@....com>
> Signed-off-by: Peng Fan <peng.fan@....com>

Looks like the documentation of DT bindings doesn't specify pinctrls
at all. Please add it and explain when they should be used.

Kind regards
Uffe

> ---
>  drivers/mmc/host/sdhci-esdhc-imx.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
> index 16ed19f47939..11d3a2244b36 100644
> --- a/drivers/mmc/host/sdhci-esdhc-imx.c
> +++ b/drivers/mmc/host/sdhci-esdhc-imx.c
> @@ -1488,7 +1488,7 @@ sdhci_esdhc_imx_probe_dt(struct platform_device *pdev,
>
>         mmc_of_parse_voltage(np, &host->ocr_mask);
>
> -       if (esdhc_is_usdhc(imx_data)) {
> +       if (esdhc_is_usdhc(imx_data) && !IS_ERR(imx_data->pinctrl)) {
>                 imx_data->pins_100mhz = pinctrl_lookup_state(imx_data->pinctrl,
>                                                 ESDHC_PINCTRL_STATE_100MHZ);
>                 imx_data->pins_200mhz = pinctrl_lookup_state(imx_data->pinctrl,
> --
> 2.28.0
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ