From: Mark Brown <broonie@kernel.org>
To: Fabio Estevam <festevam@gmail.com>
Cc: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] regmap: debugfs: Free debugfs_name buffer after usage
Date: Thu, 6 Jan 2022 20:05:15 +0000 [thread overview]
Message-ID: <YddLe8cCvj5fVBTQ@sirena.org.uk> (raw)
In-Reply-To: <CAOMZO5Czbr=vuvZdqc6+odAQv0M-LJEQVz6uke8OXnoG6wLqwA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1262 bytes --]
On Thu, Jan 06, 2022 at 04:27:32PM -0300, Fabio Estevam wrote:
> On Thu, Jan 6, 2022 at 3:33 PM Mark Brown <broonie@kernel.org> wrote:
> > OK, but what's the logic here? The name is getting thrown away here but
> I did more debugging and this is what I found:
> The 'debugfs: Directory 'dummy-iomuxc-gpr@20e0000' with parent
> 'regmap' already present!' message
> happens since commit cffa4b2122f5 ("regmap: debugfs: Fix a memory leak
> when calling regmap_attach_dev").
Sure, but that just means that the bug with not cleaning up the
directory predates that.
> # mount -t debugfs none /sys/kernel/debug/
> # cat /sys/kernel/debug/regmap/dummy-iomuxc-gpr@20e0000/registers
> 00: 00000000
> 04: 48611005
What happens if the underlying regmap gets freed for some reason? It
now only remembers the new name, not this old one, so it'll only know to
clean up the old name.
> As shown above, I don't see the '
> /sys/kernel/debug/regmap/20e0000.pinctrl-gpr' directory being created,
> so there is nothing to clean.
Creating that file is the behaviour you are demanding...
> Where exactly would you like me to call regmap_debugfs_exit()?
Before we try to reinitialise debugfs for the new name seems like the
obvious place.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2022-01-06 20:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-06 17:50 Fabio Estevam
2022-01-06 18:33 ` Mark Brown
2022-01-06 19:27 ` Fabio Estevam
2022-01-06 20:05 ` Mark Brown [this message]
2022-01-06 21:13 ` Fabio Estevam
2022-01-07 2:22 ` Fabio Estevam
2022-01-07 13:27 ` Mark Brown
2022-01-07 14:48 ` Fabio Estevam
2022-01-07 14:52 ` Mark Brown
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=YddLe8cCvj5fVBTQ@sirena.org.uk \
--to=broonie@kernel.org \
--cc=festevam@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=matthias.schiffer@ew.tq-group.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®