mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Nicolin Chen <nicoleotsuka@gmail.com>
Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	alsa-devel@alsa-project.org
Subject: Re: [PATCH] ASoC: fsl_asrc: Add reg_defaults for regmap to fix kernel dump
Date: Tue, 28 Oct 2014 00:19:04 +0000	[thread overview]
Message-ID: <20141028001904.GH18557@sirena.org.uk> (raw)
In-Reply-To: <1414202637-18929-1-git-send-email-nicoleotsuka@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1166 bytes --]

On Fri, Oct 24, 2014 at 07:03:57PM -0700, Nicolin Chen wrote:
> Kernel dump (WARN_ON) ocurred during system boot-up inside regmap_write():
> 
> ------------[ cut here ]------------
> WARNING: CPU: 0 PID: 47 at kernel/locking/lockdep.c:2744 lockdep_trace_alloc+0xe8/0x108()

Applied, thanks.  Please edit down or elide backtraces - they take up a
lot of space in the changelog compared to the amount of information they
contain.

> By looking at 2744 line, we can get that it's because regcache_rbtree_write()
> would call kmalloc() with GFP flag if it couldn't find an existing block to
> insert nodes while this kmalloc() call is inside a spin_lock_irq_save pair,
> i.e. IRQs disabled.

> Even though this may be a bug that should be fixed, I still try to send this
> patch as a quick fix (work around) since it does no harm to assign default
> values of every registers when using regcache.

It's not a bug, it's not reasonable to default allocations to atomic and
we can't really tell what context we're in.  Anything used inside a
heavily locked path should either have a default provided or arrange for
a prior write to set up the cache.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

  reply	other threads:[~2014-10-28  0:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-25  2:03 Nicolin Chen
2014-10-28  0:19 ` Mark Brown [this message]
2014-10-28  4:26   ` Nicolin Chen
2014-10-28 10:47     ` Mark Brown
2014-10-28 16:37       ` Nicolin Chen

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=20141028001904.GH18557@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=nicoleotsuka@gmail.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®