From: Josh Triplett <josh@freedesktop.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Mariusz Kozlowski <m.kozlowski@tuxland.pl>,
linux-kernel@vger.kernel.org, Ingo Molnar <mingo@elte.hu>,
"Randy.Dunlap" <rdunlap@xenotime.net>
Subject: Re: 2.6.23-rc2-mm1: sleeping function called from invalid context at kernel/mutex.c:86
Date: Thu, 09 Aug 2007 22:36:37 -0700 [thread overview]
Message-ID: <46BBF965.5030203@freedesktop.org> (raw)
In-Reply-To: <20070809171128.03f40dff.akpm@linux-foundation.org>
Andrew Morton wrote:
> On Fri, 10 Aug 2007 01:23:07 +0200
> Mariusz Kozlowski <m.kozlowski@tuxland.pl> wrote:
>
>> Hello,
>>
>> This probably doesn't have great impact ;) but ...
>> To reproduce: run torture tests for RCU and then sysrq+q.
>>
>> SysRq : Show Pending Timers
>> Timer List Version: v0.3
>> HRTIMER_MAX_CLOCK_BASES: 2
>> now at 1764338760370 nsecs
>>
>> cpu: 0
>> clock 0:
>> .index: 0
>> .resolution: 1 nsecs
>> .get_time: ktime_get_real
>> .offset: 1186699025823815427 nsecs
>> active timers:
>> clock 1:
>> .index: 1
>> .resolution: 1 nsecs
>> .get_time: ktime_get
>> .offset: 0 nsecs
>> active timers:
>> #0: <3>BUG: sleeping function called from invalid context at kernel/mutex.c:86
>> in_atomic():1, irqs_disabled():1
>> INFO: lockdep is turned off.
>> irq event stamp: 0
>> hardirqs last enabled at (0): [<00000000>] 0x0
>> hardirqs last disabled at (0): [<c0117def>] copy_process+0x4a8/0x144c
>> softirqs last enabled at (0): [<c0117e0d>] copy_process+0x4c6/0x144c
>> softirqs last disabled at (0): [<00000000>] 0x0
>> [<c0104869>] show_trace_log_lvl+0x1a/0x30
>> [<c01053ad>] show_trace+0x12/0x14
>> [<c0105515>] dump_stack+0x15/0x17
>> [<c0114da7>] __might_sleep+0xb7/0xc9
>> [<c0451771>] mutex_lock+0x15/0x1f
>> [<c0141b75>] lookup_module_symbol_name+0x17/0xc0
>> [<c014272a>] lookup_symbol_name+0x3f/0x43
>> [<c013287e>] print_name_offset+0x1f/0x96
>> [<c01330f7>] timer_list_show+0x802/0xcbd
>> [<c01335be>] sysrq_timer_list_show+0xc/0xe
>> [<c02cc4a1>] sysrq_handle_show_timers+0x8/0xa
>> [<c02cc3ac>] __handle_sysrq+0x7b/0x115
>> [<c02cc466>] handle_sysrq+0x20/0x24
>> [<c02c69c1>] kbd_event+0x3a8/0x5c7
>> [<c0362f8f>] input_pass_event+0x8f/0x91
>> [<c0363e77>] input_handle_event+0x98/0x38d
>> [<c0364e6d>] input_event+0x54/0x67
>> [<c03682c2>] atkbd_interrupt+0x200/0x59e
>> [<c0360cd0>] serio_interrupt+0x7c/0x80
>> [<c0361965>] i8042_interrupt+0x17a/0x289
>> [<c0147a5d>] handle_IRQ_event+0x28/0x59
>> [<c01493ca>] handle_level_irq+0xad/0x10b
>> [<c0105a13>] do_IRQ+0x93/0xd0
>> [<c010441e>] common_interrupt+0x2e/0x34
>> [<df39d7e3>] rcu_read_delay+0x8/0x36 [rcutorture]
>> [<df39d99a>] rcu_torture_reader+0x6e/0x169 [rcutorture]
>> [<c012c11e>] kthread+0x36/0x58
>> [<c010451b>] kernel_thread_helper+0x7/0x1c
>> =======================
>
> We seem to have made a mess in there. timer_list_show() ends up calling
> lookup_module_symbol_name(), which takes a mutex. However print_symbol()
> (which is called at oops time, interrupt time, etc) calls
> module_address_lookup(), which is basically the same, only it doesn't take
> the mutex.
>
> I guess a quicky fix would be to switch
> kernel/time/timer_list.c:print_name_offset() from
> lookup_module_symbol_name() to module_address_lookup(). But we'd still
> have a mess in there.
>
> (adds ccs, runs away)
I don't think rcutorture matters for this bug. As far as I can tell, Andrew's
description of this problem will always apply to this particular sysrq: the
keyboard interrupt leads to handle_sysrq, which leads to timer_list_show,
which leads to lookup_module_symbol_name, which acquires a mutex.
- Josh Triplett
next prev parent reply other threads:[~2007-08-10 5:37 UTC|newest]
Thread overview: 70+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-09 8:51 2.6.23-rc2-mm1 Andrew Morton
2007-08-09 10:10 ` [usb-storage] schedule_timeout: wrong timeout value c1a95554 Mariusz Kozlowski
2007-08-09 14:43 ` [linux-usb-devel] " Alan Stern
2007-08-09 15:07 ` Rafael J. Wysocki
2007-08-09 15:20 ` Mariusz Kozlowski
2007-08-09 19:15 ` Rafael J. Wysocki
2007-08-09 12:53 ` 2.6.23-rc2-mm1 -- spinlock bad magic Andy Whitcroft
2007-08-09 17:17 ` Andy Whitcroft
2007-08-09 13:04 ` 2.6.23-rc2-mm1 -- PPC G5 kernel compile failure Andy Whitcroft
2007-08-09 14:20 ` 2.6.23-rc2-mm1 -- PPC G5 kernel compile failure (patch) Krzysztof Helt
2007-08-09 17:18 ` Andy Whitcroft
2007-08-10 13:09 ` Andy Whitcroft
2007-08-09 13:23 ` 2.6.23-rc2-mm1 Michal Piotrowski
2007-08-09 18:37 ` 2.6.23-rc2-mm1 Andrew Morton
2007-08-09 19:04 ` 2.6.23-rc2-mm1 Michal Piotrowski
2007-08-09 19:10 ` 2.6.23-rc2-mm1 Andrew Morton
2007-08-09 19:27 ` 2.6.23-rc2-mm1 Jeff Garzik
2007-08-09 13:51 ` 2.6.23-rc2-mm1: e1000e global symbols must be renamed Adrian Bunk
2007-08-09 17:06 ` [E1000-devel] " Kok, Auke
2007-08-09 14:24 ` 2.6.23-rc2-mm1: no bcm43xx Rafael J. Wysocki
2007-08-09 14:16 ` Michael Buesch
2007-08-09 15:11 ` 2.6.23-rc2-mm1: kernel BUG at mm/swap_state.c:78! Mariusz Kozlowski
2007-08-09 15:14 ` Adrian Bunk
2007-08-09 15:25 ` Mariusz Kozlowski
2007-08-09 15:37 ` Hugh Dickins
2007-08-09 16:00 ` Michal Piotrowski
2007-08-10 0:30 ` Nick Piggin
2007-08-09 15:36 ` 2.6.23-rc2-mm1 Michal Piotrowski
2007-08-09 16:19 ` 2.6.23-rc2-mm1 Michal Piotrowski
2007-08-09 17:04 ` 2.6.23-rc2-mm1 Andrew Morton
2007-08-09 16:31 ` 2.6.23-rc2-mm1 Andrew Morton
2007-08-09 20:17 ` 2.6.23-rc2-mm1: silly df numbers on 32bit extN Hugh Dickins
2007-08-09 20:56 ` Andrew Morton
2007-08-09 20:30 ` 2.6.23-rc2-mm1 Jesper Juhl
2007-08-09 21:36 ` 2.6.23-rc2-mm1 Gabriel C
2007-08-09 22:04 ` 2.6.23-rc2-mm1 Andrew Morton
2007-08-09 22:42 ` 2.6.23-rc2-mm1 Alan Cox
2007-08-09 23:33 ` 2.6.23-rc2-mm1 Gabriel C
2007-08-09 23:23 ` 2.6.23-rc2-mm1: sleeping function called from invalid context at kernel/mutex.c:86 Mariusz Kozlowski
2007-08-10 0:11 ` Andrew Morton
2007-08-10 5:36 ` Josh Triplett [this message]
2007-08-10 7:27 ` Mariusz Kozlowski
2007-08-10 7:40 ` Ingo Molnar
2007-08-10 7:55 ` Andrew Morton
2007-08-11 7:24 ` Alexey Dobriyan
2007-08-09 23:49 ` 2.6.23-rc2-mm1: rtl8139 inconsistent lock state Mariusz Kozlowski
2007-08-22 13:35 ` [PATCH 2.6.23-rc3-mm1] request_irq fix DEBUG_SHIRQ handling " Jarek Poplawski
2007-08-25 9:43 ` Mariusz Kozlowski
2007-08-27 5:54 ` Jarek Poplawski
2007-08-23 8:44 ` [PATCH (take 2)] " Jarek Poplawski
2007-08-24 5:46 ` Jarek Poplawski
2007-08-10 1:31 ` 2.6.23-rc2-mm1: rcutorture xtime usage Adrian Bunk
2007-08-10 2:00 ` Paul E. McKenney
2007-08-10 2:06 ` Andrew Morton
2007-08-10 15:12 ` Paul E. McKenney
2007-08-10 17:12 ` Andrew Morton
2007-08-10 20:30 ` Paul E. McKenney
2007-08-11 0:29 ` Paul E. McKenney
2007-08-11 4:47 ` Paul E. McKenney
2007-08-11 18:09 ` Ingo Molnar
2007-08-11 19:39 ` Paul E. McKenney
2007-08-10 2:22 ` Adrian Bunk
2007-08-10 7:06 ` 2.6.23-rc2-mm1: irq lock inversion dependency detected Mariusz Kozlowski
2007-08-24 8:27 ` Jarek Poplawski
2007-08-24 8:50 ` Jarek Poplawski
2007-08-14 21:22 ` [-mm patch] make fs/nfsd/nfs4callback.c:do_probe_callback() static Adrian Bunk
2007-08-14 22:02 ` J. Bruce Fields
2007-08-14 21:23 ` [-mm patch] make drivers/ata/libata-scsi.c:ata_scsi_link_pm_policy() static Adrian Bunk
2007-08-14 21:23 ` [-mm patch] unexport ide_acpi_set_state Adrian Bunk
2007-08-14 21:23 ` [-mm patch] drivers/mtd/mtdbdi.c is no longer an own module Adrian Bunk
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=46BBF965.5030203@freedesktop.org \
--to=josh@freedesktop.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=m.kozlowski@tuxland.pl \
--cc=mingo@elte.hu \
--cc=rdunlap@xenotime.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