mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andy Yan <andy.yan@rock-chips.com>
To: "Cristian Ciocaltea" <cristian.ciocaltea@collabora.com>,
	"Sandy Huang" <hjc@rock-chips.com>,
	"Heiko Stübner" <heiko@sntech.de>,
	"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
	"Maxime Ripard" <mripard@kernel.org>,
	"Thomas Zimmermann" <tzimmermann@suse.de>,
	"David Airlie" <airlied@gmail.com>,
	"Simona Vetter" <simona@ffwll.ch>,
	"Dmitry Baryshkov" <dmitry.baryshkov@oss.qualcomm.com>,
	"Dmitry Baryshkov" <lumag@kernel.org>,
	"Andrzej Hajda" <andrzej.hajda@intel.com>,
	"Neil Armstrong" <neil.armstrong@linaro.org>,
	"Robert Foss" <rfoss@kernel.org>,
	"Laurent Pinchart" <Laurent.pinchart@ideasonboard.com>,
	"Jonas Karlman" <jonas@kwiboo.se>,
	"Jernej Skrabec" <jernej.skrabec@gmail.com>
Cc: kernel@collabora.com, dri-devel@lists.freedesktop.org,
	linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 1/2] drm/bridge: synopsys: dw-dp: Support unregistering the AUX channel
Date: Sun, 31 May 2026 18:27:14 +0800	[thread overview]
Message-ID: <9dc8e781-d03b-481b-808c-93b4855aa14c@rock-chips.com> (raw)
In-Reply-To: <20260327-drm-rk-fixes-v3-1-fd2e6900c08c@collabora.com>

Hello,

On 3/27/26 08:55, Cristian Ciocaltea wrote:
> The DisplayPort AUX channel gets initialized and registered during
> dw_dp_bind(), but it is never unregistered, which may lead to resource
> leaks and/or use-after-free.
> 
> Add the missing dw_dp_unbind() function to allow the users of the
> library to handle the required cleanup, i.e. unregister the AUX adapter.
> 
> Fixes: 86eecc3a9c2e ("drm/bridge: synopsys: Add DW DPTX Controller support library")
> Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>

    Reviewed-by: Andy Yan <andy.yan@rock-chips.com>

Thanks.
> ---
>   drivers/gpu/drm/bridge/synopsys/dw-dp.c | 6 ++++++
>   include/drm/bridge/dw_dp.h              | 1 +
>   2 files changed, 7 insertions(+)
> 
> diff --git a/drivers/gpu/drm/bridge/synopsys/dw-dp.c b/drivers/gpu/drm/bridge/synopsys/dw-dp.c
> index 3f4530c117c7..6211ba6ba7bd 100644
> --- a/drivers/gpu/drm/bridge/synopsys/dw-dp.c
> +++ b/drivers/gpu/drm/bridge/synopsys/dw-dp.c
> @@ -2093,6 +2093,12 @@ struct dw_dp *dw_dp_bind(struct device *dev, struct drm_encoder *encoder,
>   }
>   EXPORT_SYMBOL_GPL(dw_dp_bind);
>   
> +void dw_dp_unbind(struct dw_dp *dp)
> +{
> +	drm_dp_aux_unregister(&dp->aux);
> +}
> +EXPORT_SYMBOL_GPL(dw_dp_unbind);
> +
>   MODULE_AUTHOR("Andy Yan <andyshrk@163.com>");
>   MODULE_DESCRIPTION("DW DP Core Library");
>   MODULE_LICENSE("GPL");
> diff --git a/include/drm/bridge/dw_dp.h b/include/drm/bridge/dw_dp.h
> index 25363541e69d..22105c3e8e4d 100644
> --- a/include/drm/bridge/dw_dp.h
> +++ b/include/drm/bridge/dw_dp.h
> @@ -24,4 +24,5 @@ struct dw_dp_plat_data {
>   
>   struct dw_dp *dw_dp_bind(struct device *dev, struct drm_encoder *encoder,
>   			 const struct dw_dp_plat_data *plat_data);
> +void dw_dp_unbind(struct dw_dp *dp);
>   #endif /* __DW_DP__ */
> 


  reply	other threads:[~2026-05-31 10:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-27  0:55 [PATCH v3 0/2] Rockchip DRM use-after-free & null-ptr-deref fixes Cristian Ciocaltea
2026-03-27  0:55 ` [PATCH v3 1/2] drm/bridge: synopsys: dw-dp: Support unregistering the AUX channel Cristian Ciocaltea
2026-05-31 10:27   ` Andy Yan [this message]
2026-03-27  0:55 ` [PATCH v3 2/2] drm/rockchip: dw_dp: Release core resources Cristian Ciocaltea
2026-05-31 10:29   ` Andy Yan
2026-06-01 16:20     ` Cristian Ciocaltea
2026-05-30 11:29 ` [PATCH v3 0/2] Rockchip DRM use-after-free & null-ptr-deref fixes Diederik de Haas
2026-05-30 12:23   ` Cristian Ciocaltea

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9dc8e781-d03b-481b-808c-93b4855aa14c@rock-chips.com \
    --to=andy.yan@rock-chips.com \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=airlied@gmail.com \
    --cc=andrzej.hajda@intel.com \
    --cc=cristian.ciocaltea@collabora.com \
    --cc=dmitry.baryshkov@oss.qualcomm.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=heiko@sntech.de \
    --cc=hjc@rock-chips.com \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=kernel@collabora.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=lumag@kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=rfoss@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®