From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 E93B93264DF; Thu, 28 May 2026 07:32:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779953535; cv=none; b=jNLmt1ztqzS4Zh+cuJl2tfUsA40iVR115rqFS81Wo3K4s8y2pb7E1b5VEcAhe6QIltFNAn/ot29htwbEfRi6LPCBsAYlx75rtaYZSlIiTavMXExZRCJp5dSQwxkG9BIMUBhEcRqXmw1gEm7G/i3QRZOqln9NJNhRs0I1HBsa66Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779953535; c=relaxed/simple; bh=wiJKq5nMzGxB9u6tT9Q1xvF1aSEmX3a0/u8Lv3/59+k=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=VMjfc3bjxhXJW+qDI2277BVWMyR7OHg5f3iz+r+RL23rYHit8AOKWwhwLNN6RPRxmlPfE1TF/oBMzd15tOCt7/dVeZzdHf//Qr7JfJ4+8LoKCqEFIQWlT7okaRYlrENfGhSwM21Onbmrd3sLj3ieabxLBf4O3U/jj363+pgB7Wo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=RIowjc01; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="RIowjc01" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1D3EE1F000E9; Thu, 28 May 2026 07:32:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1779953532; bh=dSrILXwzPv+4lVYCkEg3KFDYgl8OcXdicI8nBzDEgU0=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=RIowjc01S7iRugRtWBcafcWBiIomWoIuTfdpxvuQRV9OOKVVOVuaV/3uCkjNIcVv9 O8jnrbFMVvhPlSYdXdEMBMq8IcQG28x6HvqPPaSnmE4e8ca/QxiBT8NOI4Ra169cxg /DGPiow942EBZjbSO/V6oY1fJoIpfrZ6NYZ3vDVE= Date: Thu, 28 May 2026 09:31:19 +0200 From: Greg KH To: Ian Klatzco Cc: stable@vger.kernel.org, yeoreum.yun@arm.com, sashal@kernel.org, peterz@infradead.org, linux-kernel@vger.kernel.org Subject: Re: stable: please backport 3b7a34aebbdf to 6.{6,12,13,14,15}.y ("perf: Fix dangling cgroup pointer in cpuctx") Message-ID: <2026052848-gangly-pound-2b1f@gregkh> References: Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Wed, May 27, 2026 at 05:25:13PM -0700, Ian Klatzco wrote: > Hi all, > > linux-6.12.y has the regression commit e9c928807239 ("perf/core: Fix > child_total_time_enabled accounting bug at task exit", backport of > mainline a3c3c6667) but is missing the follow-up fix commit 3b7a34aebbdf > ("perf: Fix dangling cgroup pointer in cpuctx", Yeoreum Yun, mainline > v6.16-rc). > > The following branches are impacted: > > linux-6.6.y > linux-6.12.y > linux-6.13.y > linux-6.14.y > linux-6.15.y > > The regression silently bypasses perf_cgroup_event_disable() on the > event-removal path when the event is non-ACTIVE at close time, leaving > cpuctx->cgrp dangling at a soon-to-be-freed perf_cgroup struct. See > 3b7a34aebbdf's commit message for the precise description. > > The minimum viable patch is as follows: > > @@ in __perf_remove_from_context, after event_sched_out(...): > + if (event->state > PERF_EVENT_STATE_OFF) > + perf_cgroup_event_disable(event, ctx); > + > > I can prepare per-branch backports if useful; please let me know. Please send backports for the trees we currently support (as listed on the front page of kernel.org). thanks, greg k-h