linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Fengguang Wu <fengguang.wu@intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>
Subject: Re: [perf_event_ctx_lock_nested] BUG: sleeping function called from invalid context at kernel/locking/mutex.c:97
Date: Mon, 30 Oct 2017 09:42:25 +0100	[thread overview]
Message-ID: <20171030084225.n3e2lsrkmjdxh6gf@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20171029230201.neja7ggefrlb7foj@wfg-t540p.sh.intel.com>

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]  [<ffffffff813de3b9>] dump_stack+0x63/0x8a
> [   41.076246]  [<ffffffff810a7083>] ___might_sleep+0xd3/0x120
> [   41.076248]  [<ffffffff810a711a>] __might_sleep+0x4a/0x80
> [   41.076254]  [<ffffffff818c5550>] mutex_lock+0x20/0x50
> [   41.076256]  [<ffffffff81179882>] perf_event_ctx_lock_nested+0x52/0xa0
> [   41.076259]  [<ffffffff8117ca1f>] perf_event_disable+0xf/0x30
> [   41.076261]  [<ffffffff81132056>] watchdog_nmi_disable+0x36/0x70
> [   41.076263]  [<ffffffff810a3a24>] ? smpboot_thread_fn+0x34/0x1f0
> [   41.076264]  [<ffffffff811320dd>] watchdog_disable+0x4d/0x60
> [   41.076266]  [<ffffffff810a3b53>] smpboot_thread_fn+0x163/0x1f0
> [   41.076267]  [<ffffffff810a39f0>] ? sort_range+0x30/0x30
> [   41.076269]  [<ffffffff810a05f5>] kthread+0xd5/0xf0
> [   41.076270]  [<ffffffff810a0520>] ? kthread_park+0x60/0x60
> [   41.076272]  [<ffffffff818c8345>] ret_from_fork+0x25/0x30

I'm not seeing where preemption would be disabled there.. we explicitly
call ->park() with preempt enabled.

  reply	other threads:[~2017-10-30  8:42 UTC|newest]

Thread overview: 79+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-23 11:03 Linux 4.14-rc6 Linus Torvalds
2017-10-29 22:51 ` Fengguang Wu
2017-10-29 23:02   ` [perf_event_ctx_lock_nested] BUG: sleeping function called from invalid context at kernel/locking/mutex.c:97 Fengguang Wu
2017-10-30  8:42     ` Peter Zijlstra [this message]
2017-10-30  8:52       ` Fengguang Wu
2017-10-29 23:10   ` [o2nm_depend_item] BUG: sleeping function called from invalid context at kernel/locking/rwsem.c:52 Fengguang Wu
2017-10-29 23:23     ` Fengguang Wu
2017-10-30  1:48       ` Eric Ren
2017-10-30  2:04       ` piaojun
2017-10-29 23:18   ` [ghes_copy_tofrom_phys] BUG: sleeping function called from invalid context at mm/page_alloc.c:4150 Fengguang Wu
2017-10-30 11:05     ` Borislav Petkov
2017-10-30 14:01       ` Tyler Baicar
2017-10-30 14:06         ` Borislav Petkov
2017-10-30 14:17           ` Tyler Baicar
2017-10-30 14:56             ` Borislav Petkov
2017-10-30 17:20       ` Linus Torvalds
2017-10-30 17:42         ` Borislav Petkov
2017-10-30 17:46         ` Linus Torvalds
2017-10-30 17:49           ` Will Deacon
2017-10-30 18:00             ` Linus Torvalds
2017-10-30 20:14           ` Tyler Baicar
2017-10-31 10:38             ` Will Deacon
2017-10-31 12:29               ` Mark Rutland
     [not found]             ` <20171106224635.qopgsszwxzuitkpf@wfg-t540p.sh.intel.com>
2017-11-06 22:57               ` [v4.14-rc8 ghes_copy_tofrom_phys] BUG: sleeping function called from invalid context at lib/ioremap.c:165 Linus Torvalds
2017-11-06 23:20                 ` Fengguang Wu
2017-11-06 23:02               ` Borislav Petkov
2017-11-06 23:04                 ` Rafael J. Wysocki
2017-11-07 13:39                 ` Fengguang Wu
     [not found]               ` <20171106225354.6ucl4f4ipsjlntzl@wfg-t540p.sh.intel.com>
2017-11-06 23:12                 ` [ata_scsi_offline_dev] BUG: sleeping function called from invalid context at kernel/locking/mutex.c:238 Linus Torvalds
2017-11-07  0:12                   ` Tejun Heo
2017-11-07  3:34                   ` Martin K. Petersen
2017-11-07  6:55                   ` Hannes Reinecke
2017-10-29 23:37   ` [pgtable_trans_huge_withdraw] BUG: unable to handle kernel NULL pointer dereference at 0000000000000020 Fengguang Wu
2017-10-30  9:19     ` Kirill A. Shutemov
2017-10-30  9:28       ` Fengguang Wu
2017-10-30 11:27         ` Kirill A. Shutemov
2017-10-30 11:58     ` Kirill A. Shutemov
2017-10-30 12:40       ` Zi Yan
2017-10-30 13:24         ` Kirill A. Shutemov
2017-10-29 23:48   ` [run_timer_softirq] BUG: unable to handle kernel paging request at 0000000000010007 Fengguang Wu
2017-10-30 19:29     ` Linus Torvalds
2017-10-30 20:37       ` Fengguang Wu
     [not found]       ` <20171109051905.pdlsyrbzrwlsjbrs@wfg-t540p.sh.intel.com>
2017-11-10 20:08         ` Linus Torvalds
2017-11-10 21:29           ` Thomas Gleixner
2017-11-11 15:35             ` Fengguang Wu
2017-10-30  6:27   ` Linux 4.14-rc6: WARNING: CPU: 9 PID: 5377 at arch/x86/events/intel/core.c:2228 intel_pmu_handle_irq+0x4a8/0x4c0 Fengguang Wu
2017-10-30 10:02     ` Peter Zijlstra
2017-10-30 22:49       ` Fengguang Wu
2017-10-31 14:57         ` Peter Zijlstra
2017-10-30  6:44   ` [migration_cpu_stop] WARNING: CPU: 0 PID: 11 at arch/x86/kernel/smp.c:128 native_smp_send_reschedule+0x69/0x9e Fengguang Wu
2017-10-30  7:00   ` [haswell_crtc_enable] WARNING: CPU: 3 PID: 109 at drivers/gpu/drm/drm_vblank.c:1066 drm_wait_one_vblank+0x18f/0x1a0 [drm] Fengguang Wu
2017-10-30 19:10     ` Linus Torvalds
2017-10-30 20:03       ` [Intel-gfx] " Rodrigo Vivi
2017-10-30 23:17         ` Fengguang Wu
2017-10-30 20:18       ` Fengguang Wu
2017-10-30  7:20   ` [btrfs] WARNING: CPU: 0 PID: 6379 at fs/direct-io.c:293 dio_complete+0x1d4/0x220 Fengguang Wu
2017-10-30  7:44     ` Eryu Guan
2017-10-31  0:10       ` Fengguang Wu
2017-10-31  6:54         ` Eryu Guan
2017-10-31  7:10           ` Fengguang Wu
2017-11-06  1:13           ` Eric Biggers
2017-11-13 19:13             ` Eric Biggers
2017-11-13 19:16               ` Jens Axboe
2017-11-13 19:21                 ` Linus Torvalds
2017-11-13 21:56                   ` Darrick J. Wong
2017-11-13 22:01                     ` Linus Torvalds
2017-11-14 17:17                       ` Theodore Ts'o
2017-10-31 15:13       ` Filipe Manana
2017-10-30  7:35   ` [locking/paravirt] static_key_disable_cpuslocked(): static key 'virt_spin_lock_key+0x0/0x20' used before call to jump_label_init() Fengguang Wu
2017-10-30  7:47     ` Juergen Gross
2017-10-30  8:38       ` Fengguang Wu
2017-10-30  9:56         ` Fengguang Wu
2017-10-30  8:43     ` Dou Liyang
2017-10-30  7:40   ` [pmem_attach_disk] WARNING: CPU: 46 PID: 518 at kernel/memremap.c:363 devm_memremap_pages+0x350/0x4b0 Fengguang Wu
2017-10-30 15:59     ` Dan Williams
2017-10-31  0:00       ` Fengguang Wu
2017-10-31  0:24         ` Dan Williams
2017-10-31  7:08           ` Fengguang Wu
2017-11-12  0:15           ` Theodore Ts'o

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=20171030084225.n3e2lsrkmjdxh6gf@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=fengguang.wu@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.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;
as well as URLs for NNTP newsgroup(s).