From nobody Sat Oct 4 09:39:51 2025 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 90EE2318153; Mon, 18 Aug 2025 10:22:27 +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=1755512549; cv=none; b=KGR8m9ZB8V/hd83gvBUKYgyRMr8t+Frr3idyZQgMtWInP9u//x0KeYD+i5JaNN3swTa+q8au2riF8oaJL4hqpuAlo4XzHcNOi71tv8MzeLJniwBYvGX+jUiFHrX44CdBxh1oDdueXXX2sLeosVrut4Ed7x8NprW3XIwx/cjTS/0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755512549; c=relaxed/simple; bh=C4q2pmErttqxZSyu9lZwtMVF/vDyAnFoZnI1fFQ+89o=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=takjaXs/oIMGbh4xAjBz1LsaUatqWBxhezTrFlbL6tLwm6OQxKWMmrHaLhFNuG3iu/8SCWPE9mANOIxq02nmiyImZHLUJhP2leVvjc+oOV34BkBcwrHjPb4JfhEh9p2WN91kL2KWovcm7VmLrOS7l/GQ+Saud+Py7JRrPGTVZ2U= 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=zg2q6E1G; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=DYZLVU8W; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="zg2q6E1G"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="DYZLVU8W" Date: Mon, 18 Aug 2025 10:22:24 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1755512546; h=from:from:sender:sender:reply-to: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:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=k9zlAOTIfN/C14vpLsnx8QPLySIMgxUI5tVZ0vbpWqA=; b=zg2q6E1GLKT2j8AR3/Wdl5ocbzjTa1TerENAzZoDhwgiWATzgkuvctLj+WqAfD7ZCElEmd c/K4LeL9wC8KB04+4SVb9JdhD9/4Zxp3UVnnqWk0/n2woovT8MJcBHbYIQdZQ2iNFedhsm VztS6r8gYYIGdD7sR1kr6TiTenG4Fbb5c5tA59sZH1tQWFws80l7ft/VMGT8XErFgePLpb RNCRq7y7yITZn7YJAtjqaSa+WsGaoE1oytqz5k5FtdjFc1nhbpXP8ISXlk1oKtYlxg2+py C3SCvOop5GKGKLc2SO1rBYUwMwMqUmnlAb2oJjLO2O94XgKVQmTW6kQkvvxIUg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1755512546; h=from:from:sender:sender:reply-to: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:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=k9zlAOTIfN/C14vpLsnx8QPLySIMgxUI5tVZ0vbpWqA=; b=DYZLVU8WnutwO0SaRXoMY9bm2ChFxFWj3pi4PI9G2QO6j7egQA5nBHf96XQHBgBExj86zF WNPXwVWUQk33GZBw== From: "tip-bot2 for Peter Zijlstra" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: perf/core] perf: Make RB allocation branch self sufficient Cc: "Peter Zijlstra (Intel)" , Lorenzo Stoakes , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20250812104019.605285302@infradead.org> References: <20250812104019.605285302@infradead.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <175551254473.1420.17395844918429910346.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the perf/core branch of tip: Commit-ID: 191759e5ea9f6995171ed2ffcc41a2377f946a3a Gitweb: https://git.kernel.org/tip/191759e5ea9f6995171ed2ffcc41a2377= f946a3a Author: Peter Zijlstra AuthorDate: Tue, 12 Aug 2025 12:39:09 +02:00 Committer: Peter Zijlstra CommitterDate: Fri, 15 Aug 2025 13:13:01 +02:00 perf: Make RB allocation branch self sufficient Ensure @rb usage doesn't extend out of the branch block. Signed-off-by: Peter Zijlstra (Intel) Reviewed-by: Lorenzo Stoakes Link: https://lore.kernel.org/r/20250812104019.605285302@infradead.org --- kernel/events/core.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/kernel/events/core.c b/kernel/events/core.c index e76afd9..875c27b 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -7116,8 +7116,6 @@ static int perf_mmap(struct file *file, struct vm_are= a_struct *vma) * multiple times. */ ret =3D 0; - /* We need the rb to map pages. */ - rb =3D event->rb; perf_mmap_account(vma, user_extra, extra); atomic_inc(&event->mmap_count); goto unlock; @@ -7136,8 +7134,6 @@ static int perf_mmap(struct file *file, struct vm_are= a_struct *vma) goto unlock; } =20 - WARN_ON(!rb && event->rb); - if (vma->vm_flags & VM_WRITE) flags |=3D RING_BUFFER_WRITABLE; =20 @@ -7190,7 +7186,7 @@ unlock: * full cleanup in this case and therefore does not invoke * vmops::close(). */ - ret =3D map_range(rb, vma); + ret =3D map_range(event->rb, vma); if (ret) perf_mmap_close(vma); =20