From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752593AbdJ3Imb (ORCPT ); Mon, 30 Oct 2017 04:42:31 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:35548 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752209AbdJ3Im3 (ORCPT ); Mon, 30 Oct 2017 04:42:29 -0400 Date: Mon, 30 Oct 2017 09:42:25 +0100 From: Peter Zijlstra To: Fengguang Wu Cc: Linus Torvalds , Linux Kernel Mailing List , Ingo Molnar , Arnaldo Carvalho de Melo , Alexander Shishkin Subject: Re: [perf_event_ctx_lock_nested] BUG: sleeping function called from invalid context at kernel/locking/mutex.c:97 Message-ID: <20171030084225.n3e2lsrkmjdxh6gf@hirez.programming.kicks-ass.net> References: <20171029225155.qcum5i75awrt5tzm@wfg-t540p.sh.intel.com> <20171029230201.neja7ggefrlb7foj@wfg-t540p.sh.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171029230201.neja7ggefrlb7foj@wfg-t540p.sh.intel.com> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Oct 30, 2017 at 12:02:01AM +0100, Fengguang Wu wrote: > The dmesg fragment is > > [ 40.886662] done > [ 40.886686] [ 40.905102] capability: warning: `turbostat' uses 32-bit > capabilities (legacy support in use) > [ 40.940087] IPMI Device Information > [ 41.073351] [ 41.076223] BUG: sleeping function called from invalid context at kernel/locking/mutex.c:97 > [ 41.076224] in_atomic(): 1, irqs_disabled(): 0, pid: 14, name: watchdog/0 > [ 41.076226] CPU: 0 PID: 14 Comm: watchdog/0 Tainted: G O 4.8.0-01558-g21f54dd #1 ^^^^^^^^^^^^^^^^^^^^ That's not 4.14 or even close. > [ 41.076228] Hardware name: Dell Inc. PowerEdge R630/0CNCJW, BIOS 2.1.7 06/16/2016 > [ 41.076231] ffffc900001bfd90 ffffffff813de3b9 ffff882062ab4b80 0000000000000061 > [ 41.076232] ffffc900001bfda8 ffffffff810a7083 ffffffff81c6fa60 ffffc900001bfdd0 > [ 41.076233] ffffffff810a711a ffff88206661d4a8 ffff882066037800 ffff88206661d4a8 > [ 41.076234] Call Trace: > [ 41.076240] [] dump_stack+0x63/0x8a > [ 41.076246] [] ___might_sleep+0xd3/0x120 > [ 41.076248] [] __might_sleep+0x4a/0x80 > [ 41.076254] [] mutex_lock+0x20/0x50 > [ 41.076256] [] perf_event_ctx_lock_nested+0x52/0xa0 > [ 41.076259] [] perf_event_disable+0xf/0x30 > [ 41.076261] [] watchdog_nmi_disable+0x36/0x70 > [ 41.076263] [] ? smpboot_thread_fn+0x34/0x1f0 > [ 41.076264] [] watchdog_disable+0x4d/0x60 > [ 41.076266] [] smpboot_thread_fn+0x163/0x1f0 > [ 41.076267] [] ? sort_range+0x30/0x30 > [ 41.076269] [] kthread+0xd5/0xf0 > [ 41.076270] [] ? kthread_park+0x60/0x60 > [ 41.076272] [] ret_from_fork+0x25/0x30 I'm not seeing where preemption would be disabled there.. we explicitly call ->park() with preempt enabled.