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: <719dcef6-a360-41cc-a5c5-fdbe53ec99d3@collabora.com>
Date: Thu, 25 Sep 2025 15:57:01 +0200
From: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>
To: Dmitry Baryshkov <dmitry.baryshkov@....qualcomm.com>
Cc: chunkuang.hu@...nel.org, p.zabel@...gutronix.de, airlied@...il.com,
 simona@...ll.ch, matthias.bgg@...il.com, dmitry.osipenko@...labora.com,
 granquet@...libre.com, rex-bc.chen@...iatek.com, ck.hu@...iatek.com,
 amergnat@...libre.com, djkurtz@...omium.org, littlecvr@...omium.org,
 bibby.hsieh@...iatek.com, dri-devel@...ts.freedesktop.org,
 linux-mediatek@...ts.infradead.org, linux-kernel@...r.kernel.org,
 linux-arm-kernel@...ts.infradead.org, kernel@...labora.com
Subject: Re: [PATCH 1/3] drm/mediatek: mtk_dp: Fix hdmi codec and phy driver
 unregistration

Il 25/09/25 03:09, Dmitry Baryshkov ha scritto:
> On Wed, Sep 24, 2025 at 12:37:06PM +0200, AngeloGioacchino Del Regno wrote:
>> During probe, this driver is registering two platform devices: one
>> for the HDMI Codec driver and one for the DisplayPort PHY driver.
>>
>> In the probe function, none of the error cases are unregistering
>> any of the two platform devices and this may cause registration
>> of multiple instances of those in case this driver returns one or
>> more probe deferral(s) in the "wrong" spots.
>>
>> In order to fix this, add devm actions to unregister those and
>> remove the manual calls to platform_device_unregister in the
>> mtk_dp_remove() function, as those would otherwise be redundant.
>>
>> Fixes: e71a8ebbe086 ("drm/mediatek: dp: Audio support for MT8195")
>> Fixes: caf2ae486742 ("drm/mediatek: dp: Add support for embedded DisplayPort aux-bus")
>> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>
>> ---
>>   drivers/gpu/drm/mediatek/mtk_dp.c | 30 ++++++++++++++++++++++++++----
>>   1 file changed, 26 insertions(+), 4 deletions(-)
>>
> 
> You can save yourself from all these troubles if you store the
> registered device at  connector->hdmi_audio.codec_pdev (see
> drm_connector_cleanup()).
> 
> And of course, you might use DRM_BRIDGE_OP_DP_AUDIO in order to reduce
> code duplication.
> 

Fair point. Noted! Thanks! :-D

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ