Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp3571328pxp; Tue, 8 Mar 2022 17:45:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJwhEMmCzzqx/oePICUzPb6j+0iJWoLDVl2Qvfd51L1C5PSyFOCX08ODusix4kEs1EwQVEGf X-Received: by 2002:a17:902:ba8c:b0:14f:d9b7:ab4 with SMTP id k12-20020a170902ba8c00b0014fd9b70ab4mr20557164pls.23.1646790342154; Tue, 08 Mar 2022 17:45:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646790342; cv=none; d=google.com; s=arc-20160816; b=rx4w9h1AoLkeIIuse9Ek2IoMv1OJkseONJ40cpBmxf6NrlNFiGj0pU33c/QwBiqv3v kmjCCRkYACoc8txr5Ch9jCL6zp8g063ehsSFuAvxAkapNPiHjZpT06sYSPUGDEjl2LAr rzWLuw5yV/3PUrBWE9I553Z9gPOxmM2dg7vl5OTdmqBbZZ/VpWHaKlG/jNxTcrQKVQ4S O4zfgO9HgZNBsWJmulKGibXcamw76YcIIww/k/PpQOQL/MW9NZfMhll6O+CJ3dQq1qZr tYDqgGsp3bspf+MPa9JKg1Knp//VlILv+/s9/Ay55t6f7M2AzZjQF+oD+qkj4MPTSkQh +daQ== 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 :message-id:subject:cc:to:from:date; bh=KD4BlrPoHxsu7R4E3OvElElB4hj9w5+h9/d2w7JFRPo=; b=gGsAcJmFQV3tq7J/MxXHZbiF5OE5rA+iiGMtpivSDIXdUcn8JBVsAZ8I9MFf11fIcq DriO04ExX9tCZ2OPYJxBJ79PoBIfnHrCyE9WGGMzxoSUGIwM7YZDZYV0yUzUwwFGgsXY nGFZkIz9JLkjDTlsSPIgCz80ngud/dateW6QsThsHWtm8zpP1r5UNCvZ2PCbOiby/6cw n4jJf2LxZYUic/pJJvHFT/L24Z6jCbF73IdDBMINK97HylbIZIfpmRvGzwe6unTTEp3I Gcrtfpsy1sjLO08nHrBIbqc8BqxJep0Eh3H2TCUSmFBCagkNR9KSnA84L3nGqsw5nB21 Z7xA== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id m10-20020a170902db0a00b00151fa74f467si638021plx.193.2022.03.08.17.45.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Mar 2022 17:45:42 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 19CE81CAF06; Tue, 8 Mar 2022 16:23:53 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350373AbiCHVP7 (ORCPT + 99 others); Tue, 8 Mar 2022 16:15:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50386 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234717AbiCHVP5 (ORCPT ); Tue, 8 Mar 2022 16:15:57 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7025E43AD5 for ; Tue, 8 Mar 2022 13:15:00 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 14438B81D86 for ; Tue, 8 Mar 2022 21:14:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3955AC340EB; Tue, 8 Mar 2022 21:14:57 +0000 (UTC) Date: Tue, 8 Mar 2022 16:14:55 -0500 From: Steven Rostedt To: Peter Zijlstra Cc: LKML , Thomas Gleixner , Sebastian Andrzej Siewior Subject: sched_core_balance() releasing interrupts with pi_lock held Message-ID: <20220308161455.036e9933@gandalf.local.home> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Peter, A ChromeOS bug report showed a lockdep splat that I first thought was a bad backport. But when looking at upstream, I don't see how it would work there either. The lockdep splat had: [56064.673346] Call Trace: [56064.676066] dump_stack+0xb9/0x117 [56064.679861] ? print_usage_bug+0x2af/0x2c2 [56064.684434] mark_lock_irq+0x25e/0x27d [56064.688618] mark_lock+0x11a/0x16c [56064.692412] mark_held_locks+0x57/0x87 [56064.696595] ? _raw_spin_unlock_irq+0x2c/0x40 [56064.701460] lockdep_hardirqs_on+0xb1/0x19d [56064.706130] _raw_spin_unlock_irq+0x2c/0x40 [56064.710799] sched_core_balance+0x8a/0x4af [56064.715369] ? __balance_callback+0x1f/0x9a [56064.720030] __balance_callback+0x4f/0x9a [56064.724506] rt_mutex_setprio+0x43a/0x48b [56064.728982] task_blocks_on_rt_mutex+0x14d/0x1d5 Where I see: task_blocks_on_rt_mutex() { spin_lock(pi_lock); rt_mutex_setprio() { balance_callback() { sched_core_balance() { spin_unlock_irq(rq); Where spin_unlock_irq() enables interrupts while holding the pi_lock, and BOOM, lockdep (rightfully) complains. The above was me looking at mainline, not the kernel that blew up. So, I'm guessing that this is a bug in mainline as well. -- Steve