Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp1831540rdb; Tue, 20 Feb 2024 08:13:14 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWib8E+jn6VD61au2aNtHbiqTDbrhZH3m4Ho8iEAH/0jY0yJ8/fy8eW1CFx3JNZvRuW56Lo18wZ+nyHcwmR4fE6xdokOXWp2cx96Nnw/w== X-Google-Smtp-Source: AGHT+IFVal0GhlidDWm+A4dga7V4dDuSZhZNNiyb0kuGauOhnSm76iBU58xwVTZiJDoGZKcxotAr X-Received: by 2002:ac8:4056:0:b0:42d:d531:2a90 with SMTP id j22-20020ac84056000000b0042dd5312a90mr12984356qtl.3.1708445594324; Tue, 20 Feb 2024 08:13:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708445594; cv=pass; d=google.com; s=arc-20160816; b=CjtGTH15j4FMxWLUojEVMcsTD945E9EkShhHVps8ByU0EUnxJFH78WeM1FPEtaOgOy pVXhv+gY3TSA8dVwwMUXvZRiDB2rC3Ys9LJv2HwOrmNcrIL/Wvs5DG7zIRrrlsz0BvId lmncKwHhwJsHFcltJCL/TJw3FkuWeRJiS/NbEZBAUP2+qDCyYgjujFklqs6UCVuRdPy5 O+RyrNq9HxbD9RwkerTuipG99gyQpO4EJWutfXGXoRLXrNOBeMCBHTzaS96/ao4oKwB4 Fuhp4pa100t7QY5aDXAoTUCewSS8jPY43jSYEv5RNb6pOTJfUlkhrf56E3UuqsTtUGYo ajpw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:references:in-reply-to:subject:cc:to:dkim-signature :dkim-signature:from; bh=3ZrY1gZPRUvTnU9/cDlk7x1h0DpwHxopqdoV/0GbhPM=; fh=FmKrlC8Yg7zX2nwUS9HH2t4ZLi7JqeRj32vQHxupbOo=; b=Xd1iHtSmKGHaQVnFFWlkhdBfgR4NjtKajXdxDdu7Fz6Oy7XR9otw/zekA1dKaF9/lO 0a9tgVMzj+Ni+0vm13vM9jnIrCVyFGeQ912hW6EuY4rOP5WfB2i5BfWAzVWG/RaJzTvR 0U8JtMTxy2aaKXqTHXvdUkDps6JThfuDb5NYF334rzLKoB1c54geJObf/HwOel1Rzma3 JblZaqUu9EplOtSVRaT9CfaOkX8ZRhw+t9wOtxU2ESBoYuhyH8RhHvyS43tZRuGFTryR tvccaNRpr/VMoHqhnRgAyDluuwlruC0GDIEJCaYKU0vu+kLToumnXkjgEUPYRxL+KImz ScnQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=vhY+zEYo; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-73315-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-73315-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id o24-20020ac85558000000b0042ddd577a3esi8494648qtr.10.2024.02.20.08.13.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Feb 2024 08:13:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-73315-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=vhY+zEYo; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-73315-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-73315-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 18AB01C2330E for ; Tue, 20 Feb 2024 16:13:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E5A4976414; Tue, 20 Feb 2024 16:12:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="vhY+zEYo"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="Dt3XistD" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B434A763F2 for ; Tue, 20 Feb 2024 16:12:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708445579; cv=none; b=aShzKcdRkWpdS9Xk7wJJrzq4lJI6K44uMn1PoE2t/HAejXqcLdwB3+mvGKCvc56YurGC2nORoVoC8h2cXDTRD0rVoSC0TShfjySYZO+K2PjX+lSYVnxuy2qTYpYbfTq7rTJQlbvQd3DA1OBkI85RCqv5KCMuAPJweJyAAGLegTA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708445579; c=relaxed/simple; bh=5tAhIw/LCPQZkqfKPCUp+TgjCjXAEnSGyozQ+zzqwmo=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=apbCYQbox3arLEN6pBrmHE6HgsUFc7qEB4mKdQsYXTWnTU1fVqtstLjNbLuLbD9kiTJWDAZLWLp1/GLh6BYno5S84oAnLF38TPXydH1bxTHTo892APjPZROFe8AKWCmXCGvjUdtSmKQW9u5gS2HxKhpyuJQQt/Cj0sf9pIXGoFQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=vhY+zEYo; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=Dt3XistD; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1708445575; 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: in-reply-to:in-reply-to:references:references; bh=3ZrY1gZPRUvTnU9/cDlk7x1h0DpwHxopqdoV/0GbhPM=; b=vhY+zEYoC7D9zwqbcnW1119riOcQ+OFEtBVbgAQVG69dJRwRab6ob5mgV+X1aVUvP4t56c cq/TLWNqUmUQcBmKe7eAFZFZ57Jy1QcO4h5eVzfNPN4pprnAbKyyWlwTPqt59igDkB6oTw qxdEgXBQ21aOx95WFj8iPIIp5bJ4YZXC5tYHbrAITXb0uH7+KKEJeqTViUce4zmsnBKfhO SYL+vcWdMA8U3XaR4LL1s2gL9ew6I8/FHvULPPF7tWb9OktJshJglCsl97olL2+NYcwm7T 4jHS6kbCeFo0KuIRYV3lFSoY82jQU2Z61xDJ9Y2TQgQhTmyhlbUAA4w8rDyhoQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1708445575; 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: in-reply-to:in-reply-to:references:references; bh=3ZrY1gZPRUvTnU9/cDlk7x1h0DpwHxopqdoV/0GbhPM=; b=Dt3XistDyurCcEeAaa7TewWu6cHD3oicJDNl30atSYP5EjgqdkCCKSXMvJ15qVqRszkeP2 AHsa+z7/BynoIqDA== To: James Morse , David Hildenbrand , x86@kernel.org, linux-kernel@vger.kernel.org Cc: Fenghua Yu , Reinette Chatre , Ingo Molnar , Borislav Petkov , H Peter Anvin , Babu Moger , shameerali.kolothum.thodi@huawei.com, D Scott Phillips OS , carl@os.amperecomputing.com, lcherian@marvell.com, bobo.shaobowang@huawei.com, tan.shaopeng@fujitsu.com, baolin.wang@linux.alibaba.com, Jamie Iles , Xin Hao , peternewman@google.com, dfustini@baylibre.com, amitsinght@marvell.com Subject: Re: [PATCH v9 02/24] x86/resctrl: kfree() rmid_ptrs from resctrl_exit() In-Reply-To: <49f42c63-63b9-4cf9-96ad-901b3fc1d50e@arm.com> References: <20240213184438.16675-1-james.morse@arm.com> <20240213184438.16675-3-james.morse@arm.com> <52f81c45-efa7-42c7-86f4-fc1084b1d57a@redhat.com> <59ebda21-6164-4dff-9ba8-956d5a715048@arm.com> <87v86jgmhp.ffs@tglx> <49f42c63-63b9-4cf9-96ad-901b3fc1d50e@arm.com> Date: Tue, 20 Feb 2024 17:12:55 +0100 Message-ID: <87sf1nglmg.ffs@tglx> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain On Tue, Feb 20 2024 at 16:01, James Morse wrote: > On 20/02/2024 15:54, Thomas Gleixner wrote: >>> With MPAM this code can be invoked from an error IRQ signalled by the hardware, so it >>> could happen anytime. >> >> Which does not work because you can't acquire a mutex from hard >> interrupt context. > > Indeed - which is why that happens via schedule_work() [0] > > My point was that its non-obvious where/when this will happen, so taking the lock and > forgetting about it is the simplest thing to do. Makes sense. Thanks, tglx