All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@digeo.com>
To: Nuno Monteiro <nuno@itsari.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Sleeping function called from illegal context at slab.c:1378
Date: Mon, 23 Sep 2002 14:30:05 -0700	[thread overview]
Message-ID: <3D8F87DD.E330A36E@digeo.com> (raw)
In-Reply-To: 20020923204916.GA915@hobbes.itsari.int

Nuno Monteiro wrote:
> 
> On 23.09.02 21:21 Andrew Morton wrote:
> 
> <snip snip>
> 
> I got two more. Its 2.5.38-mm2 too. Just thought I'd throw them in:
> 
> Sleeping function called from illegal context at slab.c:1378
> c2e73f6c c0110251 c020b800 c020faf0 00000562 000001d0 c0129080 c020faf0
>         00000562 00000060 00000008 0000012c c11e3560 c010ac77 00000080
> 000001d0
>         c2e72000 00000000 0000012c bffff948 00000000 c0106ff7 00000060
> 00000008
> Call Trace: [<c0110251>] [<c0129080>] [<c010ac77>] [<c0106ff7>]
> 
> Trace; c0110251 <__might_sleep+55/64>
> Trace; c0129080 <kmalloc+4c/130>
> Trace; c010ac77 <sys_ioperm+7f/124>
> Trace; c0106ff7 <syscall_call+7/b>

sys_ioperm() is calling kmalloc(GFP_KERNEL) inside preempt_disable()
(via get_cpu()).  That's incorrect because the kmalloc could sleep,
and switch CPUs.

> ...
> 
> Trace; c0110251 <__might_sleep+55/64>
> Trace; c012ba45 <__alloc_pages+25/218>
> Trace; c012bc60 <__get_free_pages+28/78>
> Trace; c0143cb7 <__pollwait+33/98>
> Trace; c4b28deb <[snd-pcm-oss]snd_pcm_oss_poll+47/108>
> Trace; c0143ec5 <do_select+101/210>
> Trace; c0144342 <sys_select+346/4a0>
> Trace; c0143707 <sys_ioctl+23b/294>
> Trace; c0106ff7 <syscall_call+7/b>
> 

snd_pcm_oss_poll() calls poll_wait() inside runtime->lock.
poll_wait() does __get_free_page(GFP_KERNEL).

This is a bug in snd_pcm_oss_poll().

  reply	other threads:[~2002-09-23 21:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1032804558.28404.13.camel@spc9.esa.lanl.gov>
2002-09-23 18:30 ` Sleeping function called from illegal context at slab.c:1378 Andrew Morton
2002-09-23 20:00   ` Steven Cole
2002-09-23 20:21     ` Andrew Morton
2002-09-23 20:43       ` Steven Cole
2002-09-23 20:49       ` Nuno Monteiro
2002-09-23 21:30         ` Andrew Morton [this message]
2002-09-24 13:34   ` James Morris
2002-09-24 14:53     ` [PATCH] " James Morris

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=3D8F87DD.E330A36E@digeo.com \
    --to=akpm@digeo.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno@itsari.org \
    /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.