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, 17 Jan 2022 16:42:28 +0100
From:   Robert Foss <robert.foss@...aro.org>
To:     owen <qwt9588@...il.com>
Cc:     Andrzej Hajda <andrzej.hajda@...el.com>,
        Neil Armstrong <narmstrong@...libre.com>,
        Laurent Pinchart <laurent.pinchart@...asonboard.com>,
        Jonas Karlman <jonas@...boo.se>,
        Jernej Skrabec <jernej.skrabec@...il.com>,
        David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>, Xin Ji <xji@...logixsemi.com>,
        Sam Ravnborg <sam@...nborg.org>,
        Pi-Hsun Shih <pihsun@...omium.org>,
        Tzung-Bi Shih <tzungbi@...gle.com>,
        Hsin-Yi Wang <hsinyi@...omium.org>,
        Maxime Ripard <maxime@...no.tech>,
        dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5] drm/bridge: anx7625: Return -EPROBE_DEFER if the dsi
 host was not found

Hi Owen

On Mon, 17 Jan 2022 at 11:10, owen <qwt9588@...il.com> wrote:
>
> From: owen <qwt9588@...il.com>
>
> It will connect to the mipi dsi host and find the corresponding
> mipi dsi host node, but the node registered by the mipi dsi host
> has not been loaded yet. of_find_mipi_dsi_host_by_node() returns -EINVAL
> which causes the calling driver to fail.
>
> If the anx7625 driver is loaded afterwards the driver requesting
> the mipi dsi host will not notice this.
>
> Better approach is to return -EPROBE_DEFER in such case.
> Then when the anx7625 driver appears the driver requesting
> the mipi dsi host will be probed again.
>
> Signed-off-by: owen <qwt9588@...il.com>
> ---
>  drivers/gpu/drm/bridge/analogix/anx7625.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c
> index 2346dbcc505f..297bbeb5aae0 100644
> --- a/drivers/gpu/drm/bridge/analogix/anx7625.c
> +++ b/drivers/gpu/drm/bridge/analogix/anx7625.c
> @@ -1660,7 +1660,7 @@ static int anx7625_attach_dsi(struct anx7625_data *ctx)
>         host = of_find_mipi_dsi_host_by_node(ctx->pdata.mipi_host_node);
>         if (!host) {
>                 DRM_DEV_ERROR(dev, "fail to find dsi host.\n");
> -               return -EINVAL;
> +               return -EPROBE_DEFER;
>         }
>
>         dsi = devm_mipi_dsi_device_register_full(dev, host, &info);
> --
> 2.31.0
>

Reviewed-by: Robert Foss <robert.foss@...aro.org>

Applied to drm-misc-next.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ