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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 2 Oct 2023 17:31:41 -0700
From:   Doug Anderson <dianders@...omium.org>
To:     Stephen Boyd <swboyd@...omium.org>
Cc:     Andrzej Hajda <andrzej.hajda@...el.com>,
        Neil Armstrong <neil.armstrong@...aro.org>,
        Robert Foss <rfoss@...nel.org>, linux-kernel@...r.kernel.org,
        patches@...ts.linux.dev, dri-devel@...ts.freedesktop.org,
        Maxime Ripard <maxime@...no.tech>
Subject: Re: [PATCH] drm/bridge: ti-sn65dsi86: Associate DSI device lifetime
 with auxiliary device

Hi,

On Mon, Oct 2, 2023 at 4:54 PM Stephen Boyd <swboyd@...omium.org> wrote:
>
> The kernel produces a warning splat and the DSI device fails to register
> in this driver if the i2c driver probes, populates child auxiliary
> devices, and then somewhere in ti_sn_bridge_probe() a function call
> returns -EPROBE_DEFER. When the auxiliary driver probe defers, the dsi
> device created by devm_mipi_dsi_device_register_full() is left
> registered because the devm managed device used to manage the lifetime
> of the DSI device is the parent i2c device, not the auxiliary device
> that is being probed.
>
> Associate the DSI device created and managed by this driver to the
> lifetime of the auxiliary device, not the i2c device, so that the DSI
> device is removed when the auxiliary driver unbinds. Similarly change
> the device pointer used for dev_err_probe() so the deferred probe errors
> are associated with the auxiliary device instead of the parent i2c
> device so we can narrow down future problems faster.
>
> Cc: Douglas Anderson <dianders@...omium.org>
> Cc: Maxime Ripard <maxime@...no.tech>
> Fixes: c3b75d4734cb ("drm/bridge: sn65dsi86: Register and attach our DSI device at probe")

Even before that commit I think it was using the main "dev" instead of
the auxiliary device's "dev" for some "devm" stuff. I guess the
difference is that it wouldn't mess with probe deferral? Searching
back, I think the first instance of a case that was using "devm_" with
the wrong device was commit 4e5763f03e10 ("drm/bridge: ti-sn65dsi86:
Wrap panel with panel-bridge")? Would it make sense to use that as a
Fixes, you think?

In any case, this looks reasonable to me:

Reviewed-by: Douglas Anderson <dianders@...omium.org>

I'll give it a week and then apply to "-fixes" if everything is quiet.

Powered by blists - more mailing lists