From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6A6FCC5519F for ; Mon, 23 Nov 2020 02:24:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0BEE12076B for ; Mon, 23 Nov 2020 02:24:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726928AbgKWCYz (ORCPT ); Sun, 22 Nov 2020 21:24:55 -0500 Received: from foss.arm.com ([217.140.110.172]:51706 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726885AbgKWCYy (ORCPT ); Sun, 22 Nov 2020 21:24:54 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 31B5930E; Sun, 22 Nov 2020 18:24:54 -0800 (PST) Received: from e113632-lin.cambridge.arm.com (e113632-lin.cambridge.arm.com [10.1.194.46]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id CAECF3F70D; Sun, 22 Nov 2020 18:24:52 -0800 (PST) From: Valentin Schneider To: linux-kernel@vger.kernel.org, x86@kernel.org Cc: Fenghua Yu , Reinette Chatre , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , James Morse Subject: [PATCH v2 0/3] x86/intel_rdt: task_work vs task_struct rmid/closid write race Date: Mon, 23 Nov 2020 02:24:30 +0000 Message-Id: <20201123022433.17905-1-valentin.schneider@arm.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi folks, This is a small cleanup + a fix for a race I stumbled upon while staring at resctrl stuff. Briefly tested on a Xeon Gold 5120 (m2.xlarge.x86 on Equinix) by bouncing a few tasks around control groups. Revisions ========= v1 -> v2 -------- Empty git diff between the two, but: o Collected Reviewed-by o Reworded changelogs (James) o Split READ_ONCE/WRITE_ONCE changes into separate patch (James) (@James: note that I had the audacity to slap your RB to that new patch, given that you already reviewed the diff. Hopefully you won't hate the CL too much!) Cheers, Valentin Valentin Schneider (3): x86/intel_rdt: Check monitor group vs control group membership earlier x86/intel_rdt: Plug task_work vs task_struct {rmid,closid} update race x86/intel_rdt: Apply READ_ONCE/WRITE_ONCE to task_struct .rmid & .closid arch/x86/include/asm/resctrl.h | 11 ++-- arch/x86/kernel/cpu/resctrl/rdtgroup.c | 71 ++++++++++++++++---------- 2 files changed, 50 insertions(+), 32 deletions(-) -- 2.27.0