From: Andrzej Hajda <andrzej.hajda@intel.com>
To: "José Roberto de Souza" <jose.souza@intel.com>,
intel-gfx@lists.freedesktop.org
Cc: Hangyu Hua <hbh25y@gmail.com>
Subject: Re: [Intel-gfx] [PATCH] drm: i915: fix a possible refcount leak in intel_dp_add_mst_connector()
Date: Thu, 30 Jun 2022 16:46:33 +0200 [thread overview]
Message-ID: <e32143e0-1b75-e9c4-d9d2-90c738da5d9d@intel.com> (raw)
In-Reply-To: <20220624130406.17996-1-jose.souza@intel.com>
On 24.06.2022 15:04, José Roberto de Souza wrote:
> From: Hangyu Hua <hbh25y@gmail.com>
>
> 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.
>
> Fixes: 091a4f91942a ("drm/i915: Handle drm-layer errors in intel_dp_add_mst_connector")
> Signed-off-by: Hangyu Hua <hbh25y@gmail.com>
> Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com>
Regards
Andrzej
> ---
> 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 061b277e5ce78..14d2a64193b2d 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> @@ -839,6 +839,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;
> }
next prev parent reply other threads:[~2022-06-30 14:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-24 13:04 [Intel-gfx] [PATCH] drm: i915: fix a possible refcount leak in intel_dp_add_mst_connector() José Roberto de Souza
2022-06-24 14:02 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2022-06-27 20:09 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2022-06-28 13:14 ` Souza, Jose
2022-06-30 14:46 ` Andrzej Hajda [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-05-16 7:19 [PATCH] " Hangyu Hua
2022-06-23 13:44 ` [Intel-gfx] " Souza, Jose
2022-06-23 13:45 ` Souza, Jose
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=e32143e0-1b75-e9c4-d9d2-90c738da5d9d@intel.com \
--to=andrzej.hajda@intel.com \
--cc=hbh25y@gmail.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jose.souza@intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.