[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2a11c3b90166cbc4a615db24f8dae75cfe31b5ae.camel@intel.com>
Date: Thu, 23 Jun 2022 13:44:12 +0000
From: "Souza, Jose" <jose.souza@...el.com>
To: "hbh25y@...il.com" <hbh25y@...il.com>
CC: "dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
"intel-gfx@...ts.freedesktop.org" <intel-gfx@...ts.freedesktop.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] drm: i915: fix a possible refcount leak in
intel_dp_add_mst_connector()
On Mon, 2022-05-16 at 15:19 +0800, Hangyu Hua wrote:
> If drm_connector_init fails, intel_connector_free will be called to take
> care of proper free. So it is necessary to drop the refcount of port
> before intel_connector_free.
Reviewed-by: José Roberto de Souza <jose.souza@...el.com>
>
> Fixes: 091a4f91942a ("drm/i915: Handle drm-layer errors in intel_dp_add_mst_connector")
> Signed-off-by: Hangyu Hua <hbh25y@...il.com>
> ---
> drivers/gpu/drm/i915/display/intel_dp_mst.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> index e30e698aa684..f7d46ea3afb9 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> @@ -841,6 +841,7 @@ static struct drm_connector *intel_dp_add_mst_connector(struct drm_dp_mst_topolo
> ret = drm_connector_init(dev, connector, &intel_dp_mst_connector_funcs,
> DRM_MODE_CONNECTOR_DisplayPort);
> if (ret) {
> + drm_dp_mst_put_port_malloc(port);
> intel_connector_free(intel_connector);
> return NULL;
> }
Powered by blists - more mailing lists