mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Catalin Marinas <catalin.marinas@arm.com>
To: Ming Lei <tom.leiming@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	linux-acpi@vger.kernel.org
Subject: ACPI scheduling while atomic (was: Re: [PATCH] kmemleak: Fix scheduling-while-atomic bug)
Date: Mon, 24 Aug 2009 11:02:33 +0100	[thread overview]
Message-ID: <1251108153.28030.21.camel@pc1117.cambridge.arm.com> (raw)
In-Reply-To: <d82e647a0908231710h35feb992q8ee503187faac02d@mail.gmail.com>

On Mon, 2009-08-24 at 08:10 +0800, Ming Lei wrote:
> 2009/8/23 Catalin Marinas <catalin.marinas@arm.com>:
> > On Sun, 2009-08-23 at 10:48 +0800, Ming Lei wrote:
> >> [    0.006569] ACPI: Core revision 20090521
> >> [    0.011476] BUG: scheduling while atomic: swapper/0/0x10000002
> >> [    0.011558] no locks held by swapper/0.
> >> [    0.011561] Modules linked in:
> >> [    0.011566] Pid: 0, comm: swapper Not tainted 2.6.31-rc7 #141
> >> [    0.011569] Call Trace:
> >> [    0.011577]  [<ffffffff81070bb7>] ? __debug_show_held_locks+0x22/0x24
> >> [    0.011584]  [<ffffffff8103d4ba>] __schedule_bug+0x77/0x7c
> >> [    0.011590]  [<ffffffff812da32f>] schedule+0xd6/0xa3f
> >> [    0.011596]  [<ffffffff810e4b9b>] ? kmem_cache_free+0xe2/0x158
> >> [    0.011600]  [<ffffffff810717e2>] ? trace_hardirqs_on_caller+0x12d/0x158
> >> [    0.011604]  [<ffffffff8107181a>] ? trace_hardirqs_on+0xd/0xf
> >> [    0.011609]  [<ffffffff8103e3f0>] __cond_resched+0x29/0x47
> >> [    0.011614]  [<ffffffff812dae24>] _cond_resched+0x29/0x34
> >> [    0.011620]  [<ffffffff811da90a>] acpi_ps_complete_op+0x246/0x25c
> >> [    0.011625]  [<ffffffff811db024>] acpi_ps_parse_loop+0x704/0x860
> >> [    0.011630]  [<ffffffff811da200>] acpi_ps_parse_aml+0x9f/0x2de
> >> [    0.011635]  [<ffffffff811d9181>] acpi_ns_one_complete_parse+0x101/0x11c
> >> [    0.011640]  [<ffffffff811d91bd>] acpi_ns_parse_table+0x21/0x3c
> >> [    0.011645]  [<ffffffff811d67e3>] acpi_ns_load_table+0x4f/0x94
> >> [    0.011650]  [<ffffffff811dd14a>] acpi_load_tables+0x72/0x133
> >> [    0.011656]  [<ffffffff8153c592>] acpi_early_init+0x60/0xf5
> >> [    0.011661]  [<ffffffff81519cb0>] start_kernel+0x38b/0x3a0
> >> [    0.011666]  [<ffffffff81519140>] ? early_idt_handler+0x0/0x71
> >> [    0.011670]  [<ffffffff815192a3>] x86_64_start_reservations+0xaa/0xae
> >> [    0.011675]  [<ffffffff8151939e>] x86_64_start_kernel+0xf7/0x106
> >
> > I looked at the traces and there are no kmemleak calls. It's either that
> > kmemleak is disabled or the error is not on a kmemleak path. It looks
> > more like an ACPI bug to me.
> >
> > Can you try only with slab debugging enabled (without kmemleak or
> > kmemcheck)? IIRC someone else reported a similar issue a few weeks ago.
> 
> If I only disabled kmemleak, the kernel does not print the warning, so I suppose
> it is related with kmemleak.

I can't really see how kmemleak gets involved in here. Maybe you could
just enable some of the features turned on by kmemleak like STACKTRACE
and see if you still get the error.

For x86-64 you may need this patch - http://lkml.org/lkml/2009/8/16/269

> Attachment is the .config,  hope it is usable to help to fix the warning.

Thanks but I don't have such hardware to test and I don't get this error
on x86-32.

Looking at the code, the acpi_ps_complete_op() function calls the
ACPI_PREEMPTION_POINT() macro which expands to a cond_resched() call if
IRQs aren't disabled. The IRQs are probably enabled at that point but it
seems that the context is atomic.

I cc'ed the ACPI people, maybe they can help with some suggestions 

Thanks.

-- 
Catalin


      reply	other threads:[~2009-08-24 10:03 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200907010300.n6130rRf026194@hera.kernel.org>
2009-07-01  7:53 ` [PATCH] kmemleak: Fix scheduling-while-atomic bug Ingo Molnar
2009-07-01  8:10   ` Pekka Enberg
2009-07-01  9:18   ` Catalin Marinas
2009-07-01  9:30     ` Ingo Molnar
2009-07-01  9:46       ` Catalin Marinas
2009-07-01 11:04         ` Ingo Molnar
2009-07-02 12:48           ` Exiting with locks still held (was Re: [PATCH] kmemleak: Fix scheduling-while-atomic bug) Catalin Marinas
2009-07-02 12:54             ` Pekka Enberg
2009-07-02 13:06               ` Catalin Marinas
2009-07-02 14:13               ` Catalin Marinas
2009-07-02 17:39                 ` Linus Torvalds
2009-07-03 10:18                   ` Catalin Marinas
2009-07-03  7:04             ` Ingo Molnar
2009-07-02  9:48       ` [PATCH] kmemleak: Fix scheduling-while-atomic bug Catalin Marinas
2009-07-03  7:00         ` [PATCH] kmemleak: Mark nice +10 Ingo Molnar
2009-07-03  8:09           ` Catalin Marinas
2009-07-08 13:33       ` [PATCH] kmemleak: Fix scheduling-while-atomic bug Catalin Marinas
2009-08-23  2:48         ` Ming Lei
2009-08-23 14:59           ` Catalin Marinas
2009-08-24  0:10             ` Ming Lei
2009-08-24 10:02               ` Catalin Marinas [this message]

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=1251108153.28030.21.camel@pc1117.cambridge.arm.com \
    --to=catalin.marinas@arm.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tom.leiming@gmail.com \
    --cc=torvalds@linux-foundation.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 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®