Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp2937509ybc; Mon, 18 Nov 2019 07:04:40 -0800 (PST) X-Google-Smtp-Source: APXvYqxWGuNfZDSybXsZMxyZWWPvt2AtROypEYJ/feml/tdQSsxq4S0PoPJnxtE8C3fFM9iZ5ayV X-Received: by 2002:a17:906:594a:: with SMTP id g10mr27518817ejr.164.1574089480452; Mon, 18 Nov 2019 07:04:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574089480; cv=none; d=google.com; s=arc-20160816; b=h5h7Ywc6N2YvUEplxz0ijwykSeIGrIfV5OYozPSy9bICZ7afPl8NwyhFUIuVUCv2G6 Glb4lFv8bPpjRA0MwSONLX86Xj+bhEBRovrxDL4UM1D5PR3aZhcLzvDnQSkCxPDYR4Qp 2R5vfl9E6Ic4dpi2sDm3gUb69ACGSY7EsS5aausoHM6TKS+vZniXFwa/wpIAXz7DsoqU i3MY8uLdJGJnGmeiyu5yyl6nwzFUhN4vFwAFczsEW52v3IeI5FQUWAjk0njxmsov2BT9 1gbIsDkJR5RqilXKcEx8l0Agh5rCCG++ZCjADwVVVsolcjchFEkknPPvWy+BvKWgtyrI 2h4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=XTyhnj+xSqWpU/qMZmvQCg0iRnqzVjLg7BwIhpr3zhQ=; b=LjmOcwTc9jOfHjCmyyuCss1izY/6WHgUIxXh4dtBUZaD6Je8wjxWe78UUGWsVmYmND kJLdKzlBIHiGvN8Pz3eVYVitACtUhhDT+GceI2VuDe2nrarVHJWzlVqsWOdkKaqNimGx hQpwMYiW+U46yoUrHgdJ3XesvOd+d3WAQdVxDoi+IoLJ8XoGGLIrZS6GZEJDOLJZIhzl ++hzrOdLh70PLC3BuRg9+hLDmKotDYm8MmREetLyIrStXZxAinCvMA4kqBhucbvVEtbr 6RrQ3th0UjKZn/drsOnbGLDW3aWpeY9WTtM1ZGx2ukZnHpQSllWsEuecqjnQTRp/eJuR yGFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b="cQph8sP/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d18si11642653ejr.423.2019.11.18.07.04.15; Mon, 18 Nov 2019 07:04:40 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b="cQph8sP/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727121AbfKRPCu (ORCPT + 99 others); Mon, 18 Nov 2019 10:02:50 -0500 Received: from mail.skyhub.de ([5.9.137.197]:38152 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726654AbfKRPCu (ORCPT ); Mon, 18 Nov 2019 10:02:50 -0500 Received: from zn.tnic (p200300EC2F27B50084A11D83797EBEC7.dip0.t-ipconnect.de [IPv6:2003:ec:2f27:b500:84a1:1d83:797e:bec7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 4DBD21EC0200; Mon, 18 Nov 2019 16:02:45 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1574089365; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=XTyhnj+xSqWpU/qMZmvQCg0iRnqzVjLg7BwIhpr3zhQ=; b=cQph8sP/Wq4TMZPdSE8nauihDpiKWq2+PUNTsGRyXR93blgFgGolkvH2++sCkmRy+b2k85 R9jTpPCiKDJ6VxsaXVlWq3pzJYGYLgzKxVmnYC55QBAYUR6YBgXkmTX6lZj4y8XvlPHo/D 2zykQtkHIyeZyJl7h88xvp7VAVEEIWc= Date: Mon, 18 Nov 2019 16:02:40 +0100 From: Borislav Petkov To: Xiaochen Shen Cc: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, tony.luck@intel.com, fenghua.yu@intel.com, reinette.chatre@intel.com, x86@kernel.org, linux-kernel@vger.kernel.org, pei.p.jia@intel.com Subject: Re: [PATCH] x86/resctrl: Fix potential lockdep warning Message-ID: <20191118150240.GF6363@zn.tnic> References: <1573079796-11713-1-git-send-email-xiaochen.shen@intel.com> <20191113114334.GA1647@zn.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Nov 17, 2019 at 12:13:20AM +0800, Xiaochen Shen wrote: > Actually this fix covers all the cases of an audit of the calling paths > of rdt_last_cmd_{clear,puts,printf}(), to make sure we only have the > lockdep_assert_held() in places where we are sure that it must be held. That's kinda what I suggested, isn't it? All I meant was, not to have a rdtgroup_kn_lock_live() call in the code as this function does *not* unconditionally grab the rdtgroup_mutex. And then call a function which unconditionally checks whether the mutex is held. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette