All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: Suman Anna <s-anna@ti.com>
Cc: Marc Zyngier <maz@kernel.org>,
	kernel-team@android.com, Arnd Bergmann <arnd@arndb.de>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] mfd: syscon: Don't free allocated name for regmap_config
Date: Mon, 28 Sep 2020 10:19:49 +0100	[thread overview]
Message-ID: <20200928091949.GC4637@dell> (raw)
In-Reply-To: <04fac15b-8866-efe4-1047-b20713f5200f@ti.com>

On Fri, 25 Sep 2020, Suman Anna wrote:

> On 9/24/20 7:39 AM, Lee Jones wrote:
> > On Thu, 03 Sep 2020, Marc Zyngier wrote:
> > 
> >> The name allocated for the regmap_config structure is freed
> >> pretty early, right after the registration of the MMIO region.
> >>
> >> Unfortunately, that doesn't follow the life cycle that debugfs
> >> expects, as it can access the name field long after the free
> >> has occured.
> >>
> >> Move the free on the error path, and keep it forever otherwise.
> >>
> >> Fixes: e15d7f2b81d2 ("mfd: syscon: Use a unique name with regmap_config")
> >> Signed-off-by: Marc Zyngier <maz@kernel.org>
> >> ---
> >>  drivers/mfd/syscon.c | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > Fixed the spelling mistake and applied, thanks.
> > 
> 
> Marc,
> Can you recheck the behavior once on the latest master to see if this patch is
> still needed? I see a new patch within the regmap core that is dealing with the
> delayed debugfs registration name. This follows the similar design logic I
> suggested on your initial submission [1].
> 
> Please see commit 94cc89eb8fa5 ("regmap: debugfs: Fix handling of name string
> for debugfs init delays") in mainline.
> 
> Lee,
> I haven't seen this patch in -next yet, so maybe worthwhile to hold it a little
> longer.

It's already applied.

If the lines become superfluous please submit a subsequent patch.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: Lee Jones <lee.jones@linaro.org>
To: Suman Anna <s-anna@ti.com>
Cc: Marc Zyngier <maz@kernel.org>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	Arnd Bergmann <arnd@arndb.de>,
	kernel-team@android.com
Subject: Re: [PATCH] mfd: syscon: Don't free allocated name for regmap_config
Date: Mon, 28 Sep 2020 10:19:49 +0100	[thread overview]
Message-ID: <20200928091949.GC4637@dell> (raw)
In-Reply-To: <04fac15b-8866-efe4-1047-b20713f5200f@ti.com>

On Fri, 25 Sep 2020, Suman Anna wrote:

> On 9/24/20 7:39 AM, Lee Jones wrote:
> > On Thu, 03 Sep 2020, Marc Zyngier wrote:
> > 
> >> The name allocated for the regmap_config structure is freed
> >> pretty early, right after the registration of the MMIO region.
> >>
> >> Unfortunately, that doesn't follow the life cycle that debugfs
> >> expects, as it can access the name field long after the free
> >> has occured.
> >>
> >> Move the free on the error path, and keep it forever otherwise.
> >>
> >> Fixes: e15d7f2b81d2 ("mfd: syscon: Use a unique name with regmap_config")
> >> Signed-off-by: Marc Zyngier <maz@kernel.org>
> >> ---
> >>  drivers/mfd/syscon.c | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > Fixed the spelling mistake and applied, thanks.
> > 
> 
> Marc,
> Can you recheck the behavior once on the latest master to see if this patch is
> still needed? I see a new patch within the regmap core that is dealing with the
> delayed debugfs registration name. This follows the similar design logic I
> suggested on your initial submission [1].
> 
> Please see commit 94cc89eb8fa5 ("regmap: debugfs: Fix handling of name string
> for debugfs init delays") in mainline.
> 
> Lee,
> I haven't seen this patch in -next yet, so maybe worthwhile to hold it a little
> longer.

It's already applied.

If the lines become superfluous please submit a subsequent patch.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

  reply	other threads:[~2020-09-28  9:21 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-03 16:02 [PATCH] mfd: syscon: Don't free allocated name for regmap_config Marc Zyngier
2020-09-03 16:02 ` Marc Zyngier
2020-09-08  8:22 ` Lee Jones
2020-09-08  8:22   ` Lee Jones
2020-09-24 12:39 ` Lee Jones
2020-09-24 12:39   ` Lee Jones
2020-09-26  0:28   ` Suman Anna
2020-09-26  0:28     ` Suman Anna
2020-09-28  9:19     ` Lee Jones [this message]
2020-09-28  9:19       ` Lee Jones
2021-02-16  6:34 ` Tomi Valkeinen
2021-02-16  6:34   ` Tomi Valkeinen
2021-02-16  8:42   ` Marc Zyngier
2021-02-16  8:42     ` Marc Zyngier

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=20200928091949.GC4637@dell \
    --to=lee.jones@linaro.org \
    --cc=arnd@arndb.de \
    --cc=kernel-team@android.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=s-anna@ti.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.