From: Lyude Paul <lyude@redhat.com>
To: Hangyu Hua <hbh25y@gmail.com>,
jani.nikula@linux.intel.com, joonas.lahtinen@linux.intel.com,
rodrigo.vivi@intel.com, tvrtko.ursulin@linux.intel.com,
airlied@linux.ie, daniel@ffwll.ch,
ville.syrjala@linux.intel.com, jose.souza@intel.com,
matthew.d.roper@intel.com, anshuman.gupta@intel.com,
heying24@huawei.com, james.ausmus@intel.com
Cc: intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org,
dri-devel@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH RESEND] drm: i915: fix a possible refcount leak in intel_dp_add_mst_connector()
Date: Tue, 28 Jun 2022 18:58:06 -0400 [thread overview]
Message-ID: <fb44d2a7c69ebcddcf25858b6540a4bfa1ecd09d.camel@redhat.com> (raw)
In-Reply-To: <4119ed8c7ace96e1fa46b34fd9e8404828c3e57d.camel@redhat.com>
Ah-nevermind! Seems like someone already pushed this for you :)
On Tue, 2022-06-28 at 18:55 -0400, Lyude Paul wrote:
> Nice catch!
>
> Reviewed-by: Lyude Paul <lyude@redhat.com>
>
> Will push to drm-intel-next
>
> On Fri, 2022-06-24 at 10:28 +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.
> >
> > 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>
> > ---
> > 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 061b277e5ce7..14d2a64193b2 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;
> > }
>
--
Cheers,
Lyude Paul (she/her)
Software Engineer at Red Hat
WARNING: multiple messages have this Message-ID (diff)
From: Lyude Paul <lyude@redhat.com>
To: Hangyu Hua <hbh25y@gmail.com>,
jani.nikula@linux.intel.com, joonas.lahtinen@linux.intel.com,
rodrigo.vivi@intel.com, tvrtko.ursulin@linux.intel.com,
airlied@linux.ie, daniel@ffwll.ch,
ville.syrjala@linux.intel.com, jose.souza@intel.com,
matthew.d.roper@intel.com, anshuman.gupta@intel.com,
heying24@huawei.com, james.ausmus@intel.com
Cc: intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH RESEND] drm: i915: fix a possible refcount leak in intel_dp_add_mst_connector()
Date: Tue, 28 Jun 2022 18:58:06 -0400 [thread overview]
Message-ID: <fb44d2a7c69ebcddcf25858b6540a4bfa1ecd09d.camel@redhat.com> (raw)
In-Reply-To: <4119ed8c7ace96e1fa46b34fd9e8404828c3e57d.camel@redhat.com>
Ah-nevermind! Seems like someone already pushed this for you :)
On Tue, 2022-06-28 at 18:55 -0400, Lyude Paul wrote:
> Nice catch!
>
> Reviewed-by: Lyude Paul <lyude@redhat.com>
>
> Will push to drm-intel-next
>
> On Fri, 2022-06-24 at 10:28 +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.
> >
> > 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>
> > ---
> > 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 061b277e5ce7..14d2a64193b2 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;
> > }
>
--
Cheers,
Lyude Paul (she/her)
Software Engineer at Red Hat
WARNING: multiple messages have this Message-ID (diff)
From: Lyude Paul <lyude@redhat.com>
To: Hangyu Hua <hbh25y@gmail.com>,
jani.nikula@linux.intel.com, joonas.lahtinen@linux.intel.com,
rodrigo.vivi@intel.com, tvrtko.ursulin@linux.intel.com,
airlied@linux.ie, daniel@ffwll.ch, ville.syrjala@linux.intel.com,
jose.souza@intel.com, matthew.d.roper@intel.com,
anshuman.gupta@intel.com, heying24@huawei.com,
james.ausmus@intel.com
Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH RESEND] drm: i915: fix a possible refcount leak in intel_dp_add_mst_connector()
Date: Tue, 28 Jun 2022 18:58:06 -0400 [thread overview]
Message-ID: <fb44d2a7c69ebcddcf25858b6540a4bfa1ecd09d.camel@redhat.com> (raw)
In-Reply-To: <4119ed8c7ace96e1fa46b34fd9e8404828c3e57d.camel@redhat.com>
Ah-nevermind! Seems like someone already pushed this for you :)
On Tue, 2022-06-28 at 18:55 -0400, Lyude Paul wrote:
> Nice catch!
>
> Reviewed-by: Lyude Paul <lyude@redhat.com>
>
> Will push to drm-intel-next
>
> On Fri, 2022-06-24 at 10:28 +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.
> >
> > 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>
> > ---
> > 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 061b277e5ce7..14d2a64193b2 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;
> > }
>
--
Cheers,
Lyude Paul (she/her)
Software Engineer at Red Hat
next prev parent reply other threads:[~2022-06-28 22:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-24 2:28 [PATCH RESEND] drm: i915: fix a possible refcount leak in intel_dp_add_mst_connector() Hangyu Hua
2022-06-24 2:28 ` Hangyu Hua
2022-06-24 13:07 ` [Intel-gfx] " Souza, Jose
2022-06-28 22:55 ` Lyude Paul
2022-06-28 22:55 ` Lyude Paul
2022-06-28 22:55 ` Lyude Paul
2022-06-28 22:58 ` Lyude Paul [this message]
2022-06-28 22:58 ` Lyude Paul
2022-06-28 22:58 ` Lyude Paul
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=fb44d2a7c69ebcddcf25858b6540a4bfa1ecd09d.camel@redhat.com \
--to=lyude@redhat.com \
--cc=airlied@linux.ie \
--cc=anshuman.gupta@intel.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=hbh25y@gmail.com \
--cc=heying24@huawei.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=james.ausmus@intel.com \
--cc=jani.nikula@linux.intel.com \
--cc=joonas.lahtinen@linux.intel.com \
--cc=jose.souza@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=matthew.d.roper@intel.com \
--cc=rodrigo.vivi@intel.com \
--cc=tvrtko.ursulin@linux.intel.com \
--cc=ville.syrjala@linux.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.