Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp190286pxp; Wed, 16 Mar 2022 03:44:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzg4QLhZryJYUEq7LJKAPuAv8yIJWEVU9QhxZ11VSwfE1Y5H+XxBYAVsHTv6yKKOZ3eGxwh X-Received: by 2002:a17:907:da2:b0:6df:78a1:7dcc with SMTP id go34-20020a1709070da200b006df78a17dccmr2371329ejc.573.1647427444622; Wed, 16 Mar 2022 03:44:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647427444; cv=none; d=google.com; s=arc-20160816; b=xzdR+3ham8+NU1xIrxkC1BdQ0OkKZNn30CXhsB6hSAifSAn/tt/SmwC8K47sv9NzZ0 m7BAwbxjtdRGoRZWeGWtQCYr4o8izk3y0fWyZzAx0GFJAxjGR28ffGZoZHXvbpajNGRg MHAiQ5I1PEkT+N05/lD0Y9VFgX/v4oCXehGdpO7gdPd9JdouyuI4Kf33lxEJ9pKv0Mgz VbKesrqvx7swgUgDc0QuL1YwywHGJfLYNFqWEhFzXbJpzGe5YljbWb+yw9FTgcoSxS4x eAbePc5yUCel0H4SfGWia0NviQejWp+VkD1/1jwTVsxLQINsjKV6w0Igvm021EaK/KeR 348w== 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:subject:cc:to:from:date; bh=ZqJOW+3B5kZtzTL7jwagIgOZfjM7c66hjvnCyqdRSgI=; b=YFwlrKT2xH+FmjRXCzxRLEE6g6EZoNxs3+RDIHFBExbh/7jbJHSZvf6eokqK5dFvfi hcBVabfK/ihtCsIz4GROYb+LMRd7QfQ57BAlbRHvvJa0lY1/arbjtcMzVVfPY/xoOZkW ywa/P+wDGxhZ9o/w6GXkINA6+ZByqtkhaWp08DM0ecHnKbbE3M4gKbwapfBf71MF9M4x I8+tnXNtnNbTSOGIMjmYyIqgSxppGeLNfX/AB6kv3CrBFHnQMiIR48GWSZFp0eX5Udji 2CcQcOWhlQ9at4DRKoTgR2PMwUpuXflBuiiaAqa7UoEj7/VFN/yk/rMd7j0NQpEpzoad Hb/g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u12-20020aa7d88c000000b00415f69620b5si1056332edq.0.2022.03.16.03.43.38; Wed, 16 Mar 2022 03:44:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235470AbiCOVrY (ORCPT + 99 others); Tue, 15 Mar 2022 17:47:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352016AbiCOVrX (ORCPT ); Tue, 15 Mar 2022 17:47:23 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9DF5E4B842 for ; Tue, 15 Mar 2022 14:46:09 -0700 (PDT) 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 dfw.source.kernel.org (Postfix) with ESMTPS id 3AD2861231 for ; Tue, 15 Mar 2022 21:46:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 232C1C340EE; Tue, 15 Mar 2022 21:46:08 +0000 (UTC) Date: Tue, 15 Mar 2022 17:46:06 -0400 From: Steven Rostedt To: Peter Zijlstra Cc: LKML , Thomas Gleixner , Sebastian Andrzej Siewior Subject: Re: sched_core_balance() releasing interrupts with pi_lock held Message-ID: <20220315174606.02959816@gandalf.local.home> In-Reply-To: <20220308161455.036e9933@gandalf.local.home> References: <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=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham 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 On Tue, 8 Mar 2022 16:14:55 -0500 Steven Rostedt wrote: > Hi Peter, Have you had time to look into this? Thanks, -- Steve > > 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