All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: Daniel Thompson <daniel.thompson@linaro.org>
Cc: Johan Hovold <johan@kernel.org>, Lee Jones <lee.jones@linaro.org>,
	Jingoo Han <jingoohan1@gmail.com>,
	dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, stable <stable@vger.kernel.org>,
	Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Subject: Re: [PATCH 1/3] backlight: as3711_bl: fix device-tree node lookup
Date: Wed, 15 Nov 2017 13:49:03 +0000	[thread overview]
Message-ID: <20171115134903.GD11226@localhost> (raw)
In-Reply-To: <ada29d80-4589-b419-cf9e-881bab227528@linaro.org>

On Tue, Nov 14, 2017 at 07:48:09PM +0000, Daniel Thompson wrote:
> On 14/11/17 18:05, Johan Hovold wrote:
> > On Mon, Nov 13, 2017 at 02:16:09PM +0000, Daniel Thompson wrote:
> >> On 13/11/17 10:20, Johan Hovold wrote:
> >>> Fix child-node lookup during probe, which ended up searching the whole
> >>> device tree depth-first starting at the parent rather than just matching
> >>> on its children.
> >>>
> >>> To make things worse, the parent mfd node was also prematurely freed.
> >>>
> >>> Note that the nodes returned from the two calls to of_parse_phandle()
> >>> are also leaking, but fixing that is a bit more involved as pointers to
> >>> node fields are being stored for later use.
> >>
> >> Is using a devm_kstrdup() to remember the full_name sufficient so get
> >> each of the FIXMEs cleaned up as well?
> > 
> > Yeah, that may be sufficient, but looking closer at this now, it seems
> > the name pointers (su1_fb and su2_fb) are only used as booleans, and the
> > fb_name pointer in struct as3711_bl_data is never used at all.
> > 
> > So cleaning that up somehow (e.g. and maybe even dropping non-dt
> > probing) would also work.
> > 
> > But since this is a separate, and less critical issue, I think it needs
> > to be done as a follow up to this one.
> 
> To be honest it was adding the separate and less critical FIXMEs into 
> the patches that attracted my attention in the first place. ;-)

Heh. Since I was touching those error paths, I at least wanted to record
somehow there were further issues to be addressed. But feel free to drop
the FIXMEs if you prefer.

Thanks,
Johan

WARNING: multiple messages have this Message-ID (diff)
From: Johan Hovold <johan@kernel.org>
To: Daniel Thompson <daniel.thompson@linaro.org>
Cc: Johan Hovold <johan@kernel.org>, Lee Jones <lee.jones@linaro.org>,
	Jingoo Han <jingoohan1@gmail.com>,
	dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, stable <stable@vger.kernel.org>,
	Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Subject: Re: [PATCH 1/3] backlight: as3711_bl: fix device-tree node lookup
Date: Wed, 15 Nov 2017 14:49:03 +0100	[thread overview]
Message-ID: <20171115134903.GD11226@localhost> (raw)
In-Reply-To: <ada29d80-4589-b419-cf9e-881bab227528@linaro.org>

On Tue, Nov 14, 2017 at 07:48:09PM +0000, Daniel Thompson wrote:
> On 14/11/17 18:05, Johan Hovold wrote:
> > On Mon, Nov 13, 2017 at 02:16:09PM +0000, Daniel Thompson wrote:
> >> On 13/11/17 10:20, Johan Hovold wrote:
> >>> Fix child-node lookup during probe, which ended up searching the whole
> >>> device tree depth-first starting at the parent rather than just matching
> >>> on its children.
> >>>
> >>> To make things worse, the parent mfd node was also prematurely freed.
> >>>
> >>> Note that the nodes returned from the two calls to of_parse_phandle()
> >>> are also leaking, but fixing that is a bit more involved as pointers to
> >>> node fields are being stored for later use.
> >>
> >> Is using a devm_kstrdup() to remember the full_name sufficient so get
> >> each of the FIXMEs cleaned up as well?
> > 
> > Yeah, that may be sufficient, but looking closer at this now, it seems
> > the name pointers (su1_fb and su2_fb) are only used as booleans, and the
> > fb_name pointer in struct as3711_bl_data is never used at all.
> > 
> > So cleaning that up somehow (e.g. and maybe even dropping non-dt
> > probing) would also work.
> > 
> > But since this is a separate, and less critical issue, I think it needs
> > to be done as a follow up to this one.
> 
> To be honest it was adding the separate and less critical FIXMEs into 
> the patches that attracted my attention in the first place. ;-)

Heh. Since I was touching those error paths, I at least wanted to record
somehow there were further issues to be addressed. But feel free to drop
the FIXMEs if you prefer.

Thanks,
Johan

  reply	other threads:[~2017-11-15 13:49 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-13 10:20 [PATCH 1/3] backlight: as3711_bl: fix device-tree node lookup Johan Hovold
2017-11-13 10:20 ` Johan Hovold
2017-11-13 10:20 ` [PATCH 2/3] backlight: max8925_bl: " Johan Hovold
2017-11-13 10:20   ` Johan Hovold
2017-11-13 13:57   ` Daniel Thompson
2017-11-13 13:57     ` Daniel Thompson
2017-11-13 13:57     ` Daniel Thompson
2017-11-13 10:20 ` [PATCH 3/3] backlight: tps65217_bl: " Johan Hovold
2017-11-13 10:20   ` Johan Hovold
2017-11-13 13:55   ` Daniel Thompson
2017-11-13 13:55     ` Daniel Thompson
2017-11-13 13:55     ` Daniel Thompson
2017-11-13 14:16 ` [PATCH 1/3] backlight: as3711_bl: " Daniel Thompson
2017-11-13 14:16   ` Daniel Thompson
2017-11-14 18:05   ` Johan Hovold
2017-11-14 18:05     ` Johan Hovold
2017-11-14 19:48     ` Daniel Thompson
2017-11-15 13:49       ` Johan Hovold [this message]
2017-11-15 13:49         ` Johan Hovold
2017-11-15 14:32         ` Lee Jones
2017-11-15 14:32           ` Lee Jones
2017-11-15 14:32           ` Lee Jones
2017-11-15 14:39           ` Johan Hovold
2017-11-15 14:39             ` Johan Hovold
2017-11-20 10:49             ` Johan Hovold
2017-11-20 10:49               ` Johan Hovold
2017-11-20 13:04               ` Lee Jones
2017-11-20 13:04                 ` Lee Jones

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=20171115134903.GD11226@localhost \
    --to=johan@kernel.org \
    --cc=daniel.thompson@linaro.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=g.liakhovetski@gmx.de \
    --cc=jingoohan1@gmail.com \
    --cc=lee.jones@linaro.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    /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.