From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Tue, 11 Dec 2018 19:50:59 +0100 From: Borislav Petkov To: Reinette Chatre Cc: tglx@linutronix.de, fenghua.yu@intel.com, tony.luck@intel.com, gavin.hindman@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 V2] x86/intel_rdt: Ensure usage of CPUs are locked while needed Message-ID: <20181211185059.GP27375@zn.tnic> References: <20181211123404.GC27375@zn.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-ID: On Tue, Dec 11, 2018 at 10:33:59AM -0800, Reinette Chatre wrote: > I am not sure that this is an issue when updating a schemata in the > general case. In the case when just CAT schemata (without > pseudo-locking) is updated then the cpu mask associated with the cache > instance is indeed used to determine which CPUs should have their > registers changed but only the current CPU is not checked for being > online, for the other CPUs smp_call_function_many() is used that > includes an online check. Well, in your fix rdtgroup_schemata_write() disables hotplug for its whole duration and doesn't look at what schemata update is being done, right? > I had the same question in V1's notes to the maintainer :) Whoops, and I read that... Sorry. :-\ > My initial concern was the lack of IS_ERR checking. Understanding the > flow better now it seems to me that this is indeed not a bug now. The > reasoning is that an ERR_PTR is only returned when a negative id is > provided in the parameters to rdt_find_domain(). There are currently > only two places where a negative id could be provided to > rdt_find_domain(), domain_add_cpu() and domain_remove_cpu(), and both > locations test the return value using IS_ERR. Right. I'll queue it for the normal merge window. Thx. -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply.