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: <YrXXfhu5oPrBMPfu@aptenodytes>
Date:   Fri, 24 Jun 2022 17:25:50 +0200
From:   Paul Kocialkowski <paul.kocialkowski@...tlin.com>
To:     Yang Yingliang <yangyingliang@...wei.com>
Cc:     linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org,
        airlied@...ux.ie, daniel@...ll.ch, mripard@...nel.org
Subject: Re: [PATCH -next] drm/logicvc: add missing of_node_put() in
 logicvc_layers_init()

Hi,

On Fri 24 Jun 22, 16:36, Paul Kocialkowski wrote:
> Hi Yang,
> 
> On Tue 14 Jun 22, 19:21, Yang Yingliang wrote:
> > The of_node_put() need be called in error path in logicvc_layers_init().
> > 
> > Fixes: efeeaefe9be5 ("drm: Add support for the LogiCVC display controller")
> > Reported-by: Hulk Robot <hulkci@...wei.com>
> > Signed-off-by: Yang Yingliang <yangyingliang@...wei.com>
> 
> Thanks for the fix!
> 
> Acked-by: Paul Kocialkowski <paul.kocialkowski@...tlin.com>

Adapted this after Julia's patch: Only the put on layers_node is required
on error condition.

Pushed to drm-misc-next, thanks!

Paul

> > ---
> >  drivers/gpu/drm/logicvc/logicvc_layer.c | 5 ++++-
> >  1 file changed, 4 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/logicvc/logicvc_layer.c b/drivers/gpu/drm/logicvc/logicvc_layer.c
> > index bae1c7f99569..00a37563a6dc 100644
> > --- a/drivers/gpu/drm/logicvc/logicvc_layer.c
> > +++ b/drivers/gpu/drm/logicvc/logicvc_layer.c
> > @@ -610,8 +610,11 @@ int logicvc_layers_init(struct logicvc_drm *logicvc)
> >  		}
> >  
> >  		ret = logicvc_layer_init(logicvc, layer_node, index);
> > -		if (ret)
> > +		if (ret) {
> > +			of_node_put(layer_node);
> > +			of_node_put(layers_node);
> >  			goto error;
> > +		}
> >  
> >  		of_node_put(layer_node);
> >  	}
> > -- 
> > 2.25.1
> > 
> 
> -- 
> Paul Kocialkowski, Bootlin
> Embedded Linux and kernel engineering
> https://bootlin.com



-- 
Paul Kocialkowski, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ