Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp463468iog; Fri, 17 Jun 2022 06:59:00 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tnCaSvV4lDLcBHrK60GmAQoY35Ucx7nXMvGXuEdmcr6CMjgIDKpCRVY+CgIBDhvGqajMQI X-Received: by 2002:a17:90b:38c1:b0:1e8:5df7:cfd8 with SMTP id nn1-20020a17090b38c100b001e85df7cfd8mr21616287pjb.79.1655474340227; Fri, 17 Jun 2022 06:59:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655474340; cv=none; d=google.com; s=arc-20160816; b=Vskg/D+8ydyMG5wykVNF+FVXSaITo3hwMfJxCuyyV3dEucDqppejJYJk6NEC/wTr6r 6dvhX+JfHxQa9GZwEoGwK5+4HZxIXqwDo8z76SQqwTazpOamX3aVXYH6DTFVuhqIN93Y rYbQqjGx7AnjwGpPf6ckFtQRtu7PCZTWRnBBvyLWv64ssp9W5BcoS0pw/pDmChCXbLDd ngn+1IC5uYH6s2tlJEopUwqZV+PGTzOx4m+rf02+pTv2ExKuYCa9gnpNX/n0m8UKRek4 H1Sm3SG7FybFXoJCq8SqDxSciVi/vFj9Wyl2BVfA27TwIMtceoPxppT/uST4ZyYXGDoK QYwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=MDR12awW51Ll0dBLqMaR6ReVFOSITZQ6xw6in44GvX0=; b=Gx1S64pVvNGUJEvtBb4YpSTRLrMX1WV4YBQBUrKlLmBbGsKeP0AoNtlN8gEXEsGJ2h iZhusHA4Yy8558tzppScE+sQSh9zFopUfapk3BK/nVTzbqDk5xaZx9XdAjC/ZML0whiQ 0KvtzYCMcBesCDz5Q6W7b6BzzQliAR7AFDmXlIIMba5J2rbq19BCmxirjHAltFWiR9FI Uav5LQyKppdPSwDNyNrr9lDXeegIhGjdNAMC3D/lp2+rfgjKflZ02DIb2uxy8RhOilB4 i/tHtK0Wy8hnhoDXz53kpCSwvFx2c+hnNLwIq27pollJoBjIoEewspWeHHhFMfZ6mS43 YSXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=FJuRoKam; 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 w2-20020a170902e88200b0015eaa9783ddsi7075261plg.532.2022.06.17.06.58.45; Fri, 17 Jun 2022 06:59:00 -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; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=FJuRoKam; 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 S1381817AbiFQNW2 (ORCPT + 99 others); Fri, 17 Jun 2022 09:22:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229728AbiFQNW0 (ORCPT ); Fri, 17 Jun 2022 09:22:26 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32E305EBEE for ; Fri, 17 Jun 2022 06:22:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=MDR12awW51Ll0dBLqMaR6ReVFOSITZQ6xw6in44GvX0=; b=FJuRoKamFQBxRuRHYyHn7LY1b/ kmD3gZeeSSnjNFJ8uvWhRC5Z3kolqsE1354U0RYcPee5cBY81SBmQ0+FgKvaKCDKe5MLXrm8yOiys 6aIQOF5lFqkr952B0c9jmzUwEQ7aenTrk+5IgLXLkcVJxuSlNLEIMHmi9Nhj7DFCyAXOKR2oJBH7L zKUT4SfQz7wCR8wbDZOF3ObNVo96hExCeFMM/DXaEcbjjGUaK6wsdS7dv/paHh/6gKGWrTA8n2q6o 0PxePUoRFR3Vz6hWGidhV8YhQDZF1nxDA6WT8aD+ZRHlvqyu2lrqF6wlyoad6OOtCnStewqNhuOlf hHW6AUPg==; Received: from dhcp-077-249-017-003.chello.nl ([77.249.17.3] helo=worktop.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1o2BvQ-008hHY-Ct; Fri, 17 Jun 2022 13:22:12 +0000 Received: by worktop.programming.kicks-ass.net (Postfix, from userid 1000) id 8DB749816B5; Fri, 17 Jun 2022 15:22:10 +0200 (CEST) Date: Fri, 17 Jun 2022 15:22:10 +0200 From: Peter Zijlstra To: Chen Jun Cc: linux-kernel@vger.kernel.org, mingo@redhat.com, will@kernel.org, xuqiang36@huawei.com Subject: Re: [PATCH 1/1] lockdep: pass curr_inner to print_lock_invalid_wait_context Message-ID: References: <20220616134042.130002-1-chenjun102@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220616134042.130002-1-chenjun102@huawei.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,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 Thu, Jun 16, 2022 at 01:40:42PM +0000, Chen Jun wrote: > Same information (task_wait_context(curr)) is printed twice. Yes, because at that point the inner and outer context are the same. > curr_inner in check_wait_context is what we need. IIRC it simply prints the task_wait_context as a starting point, the lockdep_print_held_locks() should include the contexts for each of those, after which you can compute the resulting value. IOW, the information is complete.