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: <fb44d2a7c69ebcddcf25858b6540a4bfa1ecd09d.camel@redhat.com>
Date:   Tue, 28 Jun 2022 18:58:06 -0400
From:   Lyude Paul <lyude@...hat.com>
To:     Hangyu Hua <hbh25y@...il.com>, jani.nikula@...ux.intel.com,
        joonas.lahtinen@...ux.intel.com, rodrigo.vivi@...el.com,
        tvrtko.ursulin@...ux.intel.com, airlied@...ux.ie, daniel@...ll.ch,
        ville.syrjala@...ux.intel.com, jose.souza@...el.com,
        matthew.d.roper@...el.com, anshuman.gupta@...el.com,
        heying24@...wei.com, james.ausmus@...el.com
Cc:     intel-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH RESEND] drm: i915: fix a possible refcount leak in
 intel_dp_add_mst_connector()

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@...hat.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@...il.com>
> > Reviewed-by: José Roberto de Souza <jose.souza@...el.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ