Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp3711581pxt; Tue, 10 Aug 2021 09:34:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy8covtI05asSdVUpSfaefJr7elhu6dTmS0078KMqhuxvLX96v9ClLDr3qbLqhKxqu6GM0q X-Received: by 2002:a02:b058:: with SMTP id q24mr27613449jah.88.1628613294751; Tue, 10 Aug 2021 09:34:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628613294; cv=none; d=google.com; s=arc-20160816; b=eqyQsKk79C33XyJ5HXibmBrS/svfk+GDqnfkgwiKpf2IdCBu5gdPZse1HS8i32gkma 3zF9tcScRoRPUNRLWjiHN4tyeu9aHBHI7pC37XJcUvOJBgNzJ1HgcuQ++sF8KY9nv/2l v72Eqgk1znP117RbLVoiaQ1OVJ4WE4oS8Xyw2Vy4jZJvDAwZM3jY9X4SI25nZqZSRn+A oiUKRCYfphhqJxeZPc7S/LQ2K5s+y5LcF3uIGhxD5XqXCSsOCUz8sE9O2kU4SmCLr2Aa kS66UV+4iCZLMXzrt458bhDpL0bb1YxrBVTZ13xdLWS2K5UGc4u5f/V+PBjWwJvlvJ5I OlnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=TGlW9I235rJurT81UT07VU/qi/imLIwwmFGaHOvJ82k=; b=jZqqOLjKqcNAWU5mUWUsmLTk8wHRGYBTZCDPa2b1ai/XkZavNtD109lAr+9n4CjKui Vj+pk1Hd2fEVvmqOBSVKF2N6h2d4PbESOSGpSwOvDlXzk0So1MzpwMmdwIqoMrL8eMId K1AMRVRL8MXVvaXUR/rAxxJO7OYh6hyQUjjEmlQhA528Grw3VW0xCRVWJHVAQDrQZS4z GTsnWz6F8/f9ipRVDWUitGFVlbVQn1K5gZuGdUiJFcpaXQcjj9h5WSPSRe7TuR/4duq7 yYFgeyOk9yoIs++W0d0E2tklR0Rh1oSi3PU8SkU0yQX6e7LjCEavrPoqeGRyLZWu5cI3 1rFQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u15si24849031iot.89.2021.08.10.09.34.42; Tue, 10 Aug 2021 09:34:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241786AbhHJNnO (ORCPT + 99 others); Tue, 10 Aug 2021 09:43:14 -0400 Received: from foss.arm.com ([217.140.110.172]:55768 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241574AbhHJNnC (ORCPT ); Tue, 10 Aug 2021 09:43:02 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 798BB1063; Tue, 10 Aug 2021 06:42:40 -0700 (PDT) Received: from e113632-lin.cambridge.arm.com (e113632-lin.cambridge.arm.com [10.1.194.46]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 42FA13F70D; Tue, 10 Aug 2021 06:42:39 -0700 (PDT) From: Valentin Schneider To: linux-kernel@vger.kernel.org, linux-rt-users@vger.kernel.org Cc: Will Deacon , Mark Rutland , Marc Zyngier , Thomas Gleixner , Sebastian Andrzej Siewior , Mel Gorman Subject: [SPLAT 1/3] arm_pmu: Sleeping spinlocks down armpmu_alloc_atomic() Date: Tue, 10 Aug 2021 14:41:25 +0100 Message-Id: <20210810134127.1394269-2-valentin.schneider@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210810134127.1394269-1-valentin.schneider@arm.com> References: <20210810134127.1394269-1-valentin.schneider@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ 4.172817] BUG: sleeping function called from invalid context at kernel/locking/spinlock_rt.c:35 [ 4.172820] in_atomic(): 0, irqs_disabled(): 128, non_block: 0, pid: 19, name: cpuhp/0 [ 4.172822] 3 locks held by cpuhp/0/19: [ 4.172824] #0: ffff800011cf8690 (cpu_hotplug_lock){++++}-{0:0}, at: cpuhp_thread_fun (kernel/cpu.c:739) [ 4.172833] #1: ffff800011cf86e0 (cpuhp_state-up){+.+.}-{0:0}, at: cpuhp_thread_fun (kernel/cpu.c:739) [ 4.172838] #2: ffff008f36237c08 (&(&c->lock)->lock){+.+.}-{0:0}, at: ___slab_alloc (mm/slub.c:2872) [ 4.172844] irq event stamp: 40 [ 4.172845] hardirqs last enabled at (39): finish_task_switch (./arch/arm64/include/asm/irqflags.h:35 kernel/sched/sched.h:1319 kernel/sched/core.c:4531 kernel/sched/core.c:4649) [ 4.172849] hardirqs last disabled at (40): cpuhp_thread_fun (kernel/cpu.c:761 (discriminator 1)) [ 4.172851] softirqs last enabled at (0): copy_process (./include/linux/lockdep.h:195 ./include/linux/lockdep.h:202 ./include/linux/lockdep.h:208 ./include/linux/seqlock.h:78 kernel/fork.c:2084) [ 4.172855] softirqs last disabled at (0): 0x0 [ 4.172860] CPU: 0 PID: 19 Comm: cpuhp/0 Tainted: G W 5.14.0-rc4-rt6-torture+ #56 [ 4.172863] Hardware name: MiTAC RAPTOR EV-883832-X3-0001/RAPTOR, BIOS 1.0 06/28/2019 [ 4.172864] Call trace: [ 4.172865] dump_backtrace (arch/arm64/kernel/stacktrace.c:151) [ 4.172867] show_stack (arch/arm64/kernel/stacktrace.c:217) [ 4.172869] dump_stack_lvl (lib/dump_stack.c:106) [ 4.172872] dump_stack (lib/dump_stack.c:113) [ 4.172874] ___might_sleep (kernel/sched/core.c:9306) [ 4.172877] rt_spin_lock (kernel/locking/rtmutex.c:1641 (discriminator 4) kernel/locking/spinlock_rt.c:30 (discriminator 4) kernel/locking/spinlock_rt.c:36 (discriminator 4) kernel/locking/spinlock_rt.c:44 (discriminator 4)) [ 4.172879] ___slab_alloc (mm/slub.c:2872) [ 4.172882] __slab_alloc.isra.0 (mm/slub.c:3038) [ 4.172884] kmem_cache_alloc_trace (mm/slub.c:3129 mm/slub.c:3171 mm/slub.c:3188) [ 4.172886] __armpmu_alloc (./include/linux/slab.h:591 ./include/linux/slab.h:721 drivers/perf/arm_pmu.c:869) [ 4.172889] armpmu_alloc_atomic (drivers/perf/arm_pmu.c:927) [ 4.172891] arm_pmu_acpi_cpu_starting (drivers/perf/arm_pmu_acpi.c:202 drivers/perf/arm_pmu_acpi.c:264) [ 4.172893] cpuhp_invoke_callback (kernel/cpu.c:180) [ 4.172895] cpuhp_thread_fun (kernel/cpu.c:762 (discriminator 3)) [ 4.172896] smpboot_thread_fn (kernel/smpboot.c:164 (discriminator 3)) [ 4.172900] kthread (kernel/kthread.c:327) [ 4.172902] ret_from_fork (arch/arm64/kernel/entry.S:783)