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: <CAG3jFyusEzjGN5qmXXfQSpYoPudOGTXHsOpucqbVhN0Zr9nBbw@mail.gmail.com>
Date:   Mon, 24 Oct 2022 09:53:59 +0200
From:   Robert Foss <robert.foss@...aro.org>
To:     Pin-yen Lin <treapking@...omium.org>
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>,
        Allen Chen <allen.chen@....com.tw>,
        AngeloGioacchino Del Regno 
        <angelogioacchino.delregno@...labora.com>,
        Hermes Wu <hermes.wu@....com.tw>,
        dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/3] drm/bridge: it6505: Initialize AUX channel in it6505_i2c_probe

On Thu, 13 Oct 2022 at 13:04, Pin-yen Lin <treapking@...omium.org> wrote:
>
> During device boot, the HPD interrupt could be triggered before the DRM
> subsystem registers it6505 as a DRM bridge. In such cases, the driver
> tries to access AUX channel and causes NULL pointer dereference.
> Initializing the AUX channel earlier to prevent such error.
>
> Fixes: b5c84a9edcd4 ("drm/bridge: add it6505 driver")
> Signed-off-by: Pin-yen Lin <treapking@...omium.org>
> ---
>
> (no changes since v1)
>
>  drivers/gpu/drm/bridge/ite-it6505.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/bridge/ite-it6505.c b/drivers/gpu/drm/bridge/ite-it6505.c
> index a4302492cf8d..f7f6c3e20fae 100644
> --- a/drivers/gpu/drm/bridge/ite-it6505.c
> +++ b/drivers/gpu/drm/bridge/ite-it6505.c
> @@ -2871,10 +2871,7 @@ static int it6505_bridge_attach(struct drm_bridge *bridge,
>         }
>
>         /* Register aux channel */
> -       it6505->aux.name = "DP-AUX";
> -       it6505->aux.dev = dev;
>         it6505->aux.drm_dev = bridge->dev;
> -       it6505->aux.transfer = it6505_aux_transfer;
>
>         ret = drm_dp_aux_register(&it6505->aux);
>
> @@ -3354,6 +3351,11 @@ static int it6505_i2c_probe(struct i2c_client *client,
>         debugfs_init(it6505);
>         pm_runtime_enable(dev);
>
> +       it6505->aux.name = "DP-AUX";
> +       it6505->aux.dev = dev;
> +       it6505->aux.transfer = it6505_aux_transfer;
> +       drm_dp_aux_init(&it6505->aux);
> +
>         it6505->bridge.funcs = &it6505_bridge_funcs;
>         it6505->bridge.type = DRM_MODE_CONNECTOR_DisplayPort;
>         it6505->bridge.ops = DRM_BRIDGE_OP_DETECT | DRM_BRIDGE_OP_EDID |
> --
> 2.38.0.rc1.362.ged0d419d3c-goog
>

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ