mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Torrey Hoffman <thoffman@arnor.net>
Cc: linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org
Subject: Re: 2.6.-test10: bad "__might_sleep" in ALSA sound drivers
Date: Mon, 24 Nov 2003 18:00:17 -0800	[thread overview]
Message-ID: <20031124180017.70d58566.akpm@osdl.org> (raw)
In-Reply-To: <1069718546.2268.9.camel@moria.arnor.net>

Torrey Hoffman <thoffman@arnor.net> wrote:
>
> I get this every time I boot 2.6.0-test10.  I think this problem has
> been around for a while.
> 
> Debug: sleeping function called from invalid context at
> include/asm/semaphore.h:119
> in_atomic():1, irqs_disabled():0
> Call Trace:
>  [<c01229d0>] __might_sleep+0xab/0xc9
>  [<fcff57bd>] ap_cs8427_sendbytes+0x38/0xd2 [snd_ice1712]
>  [<fcfa825a>] snd_i2c_sendbytes+0x22/0x26 [snd_i2c]
>  [<fcfaf15e>] snd_cs8427_reg_read+0x2c/0x8c [snd_cs8427]
>  [<fcfaf414>] snd_cs8427_create+0xa4/0x347 [snd_cs8427]
>  [<c02dc4b0>] snd_device_new+0x20/0x6a
>  [<fcff151a>] snd_ice1712_init_cs8427+0x2f/0x6f [snd_ice1712]
>  [<fcff6153>] snd_ice1712_delta_init+0x230/0x2b9 [snd_ice1712]
>  [<fcff5227>] snd_ice1712_probe+0x323/0x34c [snd_ice1712]

snd_cs8427_create() does:

	snd_i2c_lock(bus);
	if ((err = snd_cs8427_reg_read(device, CS8427_REG_ID_AND_VER)) != CS8427_VER8427A) {

the first statement takes a spinlock.  snd_cs8427_reg_read() then calls
ap_cs8427_sendbytes() which downs a semaphore.


It might be more appropriate to use a semaphore for ice1712_t.gpio_mutex?



  reply	other threads:[~2003-11-25  1:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-25  0:02 Torrey Hoffman
2003-11-25  2:00 ` Andrew Morton [this message]
2003-11-25 10:33   ` Takashi Iwai

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=20031124180017.70d58566.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=thoffman@arnor.net \
    /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®