Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4134826imu; Mon, 10 Dec 2018 13:47:03 -0800 (PST) X-Google-Smtp-Source: AFSGD/VdDiM/fkY7X3fwBIIN+/qiiIy33usAH1ydbU0Vm5zd5psBjJx2zmwILSbIZA/fnYmZCExg X-Received: by 2002:a17:902:7005:: with SMTP id y5mr13718092plk.7.1544478422947; Mon, 10 Dec 2018 13:47:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544478422; cv=none; d=google.com; s=arc-20160816; b=j+zStf+Nohsq79wL2GdwSYu9U57zQqsVohLKDZdZAkB7DlpnHxFhiF3qUwrUnJgjEE vUQzNL3rV4JYGZbs7w/4VqphoUt6TbVsr1Ewdu6V8H3ZBalPMwomchtFT1r6I8hq5vsm uyjVOwaAbPA+zqL4Z7dgHBqlotx2lMg38NtiuqpC/RuPcOlZzZan0CWvCb1e/mTYGlt8 hd7e3PB1pSCJxVyRC4nwueCT+KEmG1knFl1MNCFCBp2OA4u1r+k9eGGtka4Qyo2Pmn/2 d0z1kttb6fdQgVKAjzeA+2RqZAsqVmpvEJfMNCJ+g8b+eIs6ibfZ3CdAHa2o21ROvy0F lP4w== 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=im/HPAMpva0SD6RJpQWAEDKLyRT050cB1ZM+ElO9QF0=; b=LNLDlmolzXoXmTijc005VKG3+ZTATq9h3ZM+Znqp4Rq2h1eiD9F6VlqMTEsXeZoMXi TBtWTu+mx6DfYGk3LSOm4up4Dr+Gonn3KMwin0rZYQ7COwBIRDrV0Q5sEjlkbYiQwbdr pnZ4JGpIDRaAfD+ytslKtk48tOQl3LeCym2UbE0RDJRSBNzFLIumtJpCkeVhLtgdfzxa CwZrTE0Nk0T2e2fve92EqQ0qSotAgGLjgFdqfNy4ruD3ZeBr9ZrFbu4k8RXwqYspNwzy 6K/8SDZ16q3AIJEerb+y5ZaGT4t8vs6+0yEYvEJK+4QpUx0BxgXHYFCYkYCObIBA75oh 0dNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=p+zJMHij; 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=REJECT sp=REJECT 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 c10si10692007pll.271.2018.12.10.13.46.47; Mon, 10 Dec 2018 13:47:02 -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=p+zJMHij; 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=REJECT sp=REJECT dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729749AbeLJUtV (ORCPT + 99 others); Mon, 10 Dec 2018 15:49:21 -0500 Received: from mail.skyhub.de ([5.9.137.197]:51068 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726392AbeLJUtV (ORCPT ); Mon, 10 Dec 2018 15:49:21 -0500 Received: from zn.tnic (p200300EC2BCAD0002992494E33A10E64.dip0.t-ipconnect.de [IPv6:2003:ec:2bca:d000:2992:494e:33a1:e64]) (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 3B6961EC0322; Mon, 10 Dec 2018 21:49:19 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1544474959; 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=im/HPAMpva0SD6RJpQWAEDKLyRT050cB1ZM+ElO9QF0=; b=p+zJMHijxOpotETaasvR6g+QcKF8318PYbs1nr3mlQUsSc8OCnZSUvNVbuXAoJ14yAQ+uS R05xd7LBg1RbKV8CU0B7gfbGLmv4KlqoRVt7nMiyfQsQ6bAnV3ZnK/H0JFoy7sXyqgpNsU 2Tknw7P8Wh1q/ZAn87gDv1Niw167Wz4= Date: Mon, 10 Dec 2018 21:49:15 +0100 From: Borislav Petkov To: Reinette Chatre Cc: tglx@linutronix.de, fenghua.yu@intel.com, tony.luck@intel.com, jithu.joseph@intel.com, mingo@redhat.com, hpa@zytor.com, x86@kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH] x86/resctrl: Ensure usage of CPUs are locked while needed Message-ID: <20181210204915.GH5482@zn.tnic> References: <725073a1f4448e3c45ed7102229e6946ca2526d8.1543428144.git.reinette.chatre@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <725073a1f4448e3c45ed7102229e6946ca2526d8.1543428144.git.reinette.chatre@intel.com> 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 Wed, Nov 28, 2018 at 10:22:07AM -0800, Reinette Chatre wrote: > The user triggers the creation of a pseudo-locked region when writing > the requested schemata to the schemata resctrl file. The pseudo-locking > of a region is required to be done on a CPU that is associated with the > cache on which the pseudo-locked region will reside. In order to run the > locking code on a specific CPU the needed CPU has to be selected and > ensured to remain online during the entire locking sequence. > > At this time the cpu_hotplug_lock is not taken during the pseudo-lock > region creation and it is thus possible for a CPU to be selected to run > the pseudo-locking code and then that CPU to go offline before the > thread is able to run on it. > > Fix this by ensuring that the cpu_hotplug_lock is taken while the CPU on > which code has to run needs to be controlled. Since the cpu_hotplug_lock > is always taken before rdtgroup_mutex the lock order is maintained. > > Fixes: e0bdfe8e36f3 ("x86/intel_rdt: Support creation/removal of pseudo-locked region") > Signed-off-by: Reinette Chatre > Cc: stable@vger.kernel.org > --- > arch/x86/kernel/cpu/resctrl/ctrlmondata.c | 4 ++++ > 1 file changed, 4 insertions(+) This looks like it wants to go in now, right? If so, pls redo this patch against tip/x86/urgent which has the old filenames, before the resctrl rename and reorg. Thx. -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply.