From: Mark Brown <broonie@kernel.org>
To: Tero Kristo <t-kristo@ti.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] regmap: debugfs: Fix a boot time crash with early regmap init
Date: Thu, 24 Oct 2013 10:18:57 +0100 [thread overview]
Message-ID: <20131024091857.GG31415@sirena.org.uk> (raw)
In-Reply-To: <1382605668-31395-1-git-send-email-t-kristo@ti.com>
[-- Attachment #1: Type: text/plain, Size: 695 bytes --]
On Thu, Oct 24, 2013 at 12:07:48PM +0300, Tero Kristo wrote:
> + if (!regmap_debugfs_root) {
> + struct regmap_debugfs_node *node;
> + node = kzalloc(sizeof(*node), GFP_KERNEL);
> + if (!node)
> + return;
> + node->map = map;
> + node->name = name;
> + list_add(&node->link, ®map_debugfs_early);
> + return;
> + }
> +
init is somewhat parallel so I'd be happier if we locked the list to
make sure that we don't corrupt the list.
We also need something to handle removal of items from the list if the
regmap is destroyed prior to the initcall running (for example in error
handling cases), otherwise we could end up creating debugfs files
pointing at devices that no longer exist.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2013-10-24 9:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-24 9:07 Tero Kristo
2013-10-24 9:18 ` Mark Brown [this message]
2013-10-24 12:03 ` Tero Kristo
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=20131024091857.GG31415@sirena.org.uk \
--to=broonie@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=t-kristo@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 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®