Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761005AbXHJH1W (ORCPT ); Fri, 10 Aug 2007 03:27:22 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756641AbXHJH1O (ORCPT ); Fri, 10 Aug 2007 03:27:14 -0400 Received: from xdsl-664.zgora.dialog.net.pl ([81.168.226.152]:2241 "EHLO tuxland.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754074AbXHJH1N (ORCPT ); Fri, 10 Aug 2007 03:27:13 -0400 From: Mariusz Kozlowski To: Josh Triplett Subject: Re: 2.6.23-rc2-mm1: sleeping function called from invalid context at kernel/mutex.c:86 Date: Fri, 10 Aug 2007 09:27:08 +0200 User-Agent: KMail/1.9.5 Cc: Andrew Morton , linux-kernel@vger.kernel.org, Ingo Molnar , "Randy.Dunlap" References: <20070809015106.cd0bfc53.akpm@linux-foundation.org> <20070809171128.03f40dff.akpm@linux-foundation.org> <46BBF965.5030203@freedesktop.org> In-Reply-To: <46BBF965.5030203@freedesktop.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200708100927.09526.m.kozlowski@tuxland.pl> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3291 Lines: 84 > >> 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): [] copy_process+0x4a8/0x144c > >> softirqs last enabled at (0): [] copy_process+0x4c6/0x144c > >> softirqs last disabled at (0): [<00000000>] 0x0 > >> [] show_trace_log_lvl+0x1a/0x30 > >> [] show_trace+0x12/0x14 > >> [] dump_stack+0x15/0x17 > >> [] __might_sleep+0xb7/0xc9 > >> [] mutex_lock+0x15/0x1f > >> [] lookup_module_symbol_name+0x17/0xc0 > >> [] lookup_symbol_name+0x3f/0x43 > >> [] print_name_offset+0x1f/0x96 > >> [] timer_list_show+0x802/0xcbd > >> [] sysrq_timer_list_show+0xc/0xe > >> [] sysrq_handle_show_timers+0x8/0xa > >> [] __handle_sysrq+0x7b/0x115 > >> [] handle_sysrq+0x20/0x24 > >> [] kbd_event+0x3a8/0x5c7 > >> [] input_pass_event+0x8f/0x91 > >> [] input_handle_event+0x98/0x38d > >> [] input_event+0x54/0x67 > >> [] atkbd_interrupt+0x200/0x59e > >> [] serio_interrupt+0x7c/0x80 > >> [] i8042_interrupt+0x17a/0x289 > >> [] handle_IRQ_event+0x28/0x59 > >> [] handle_level_irq+0xad/0x10b > >> [] do_IRQ+0x93/0xd0 > >> [] common_interrupt+0x2e/0x34 > >> [] rcu_read_delay+0x8/0x36 [rcutorture] > >> [] rcu_torture_reader+0x6e/0x169 [rcutorture] > >> [] kthread+0x36/0x58 > >> [] 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. Maybe not but that's the only way I could trigger it (insmod rcutorture and sysrq+q). Thanks, Mariusz - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/