From nobody Tue Sep 29 09:09:31 2026 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 CC2F349620; Mon, 10 Aug 2026 07:41:44 +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=1786347706; cv=none; b=PLkHTWZeVlV8+0tZTkSqR1bTfpsYtqx+lftqmmh+GFAz+H0NJRhByS12xwMV1MvqZ+NTgSlAHeNXuFEVQYtc2h/I7B3d88J4mf2Rf9uzrfidJoE+DGWRicLMdaKlYvgxWB0A0KZmgB0PJrnR5G3s5KfOg09fw5YnNs14iFknaAg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786347706; c=relaxed/simple; bh=MBaOcA8lOODyTkBRnpK5VqtZr4CBzLIAWX6Mqugyjjg=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=rKxvm4mEVLqHJEL9AhCA8Wt61XIKhReC7UBpjXvpXYHJG/EvIagFxbtRAPvT90vsU4t3xmyzw8kD40Vkdhfz3QnMSCwVMaelTcyEDa+6ch1r7c4aT2sauIxaEXLLIG+3gD0LgApy8aKaIcLnaLXtcvsb02LkWfqXaQiIWhFUAYQ= 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=K2z766WR; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=T5rfiZYu; 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="K2z766WR"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="T5rfiZYu" Date: Mon, 10 Aug 2026 07:41:41 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1786347702; 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=QHofGfUm9GPK0ALrkOx1L4FzHq4gYtyizd6GWrT6fhI=; b=K2z766WRTa1z3jO7281ASKgQfEOEqBrkuvSjmcapE8JPIlDv9xhwSi3jleTTEmshn2yPzH A2WwrGKNK4HnpKQF426VqNXHHhmQQ5VuoLiy4ecKYZPq1mprfVSkvaYmU8nuGmO9ucKor5 Hd1gk1MQp/zWVqtDK27MVvWZEAHJAVKAiYRbaWcGOJcvWMP6ntqNm475EoM9s34o9JvXxT ZVhLT+eZOUDFxHZMSUVOo6yM9LUzJpMovhx2rY/oLZaHsP+N9Yt9JuimI+6lVBejAy9NIX bBL6OTH8KHgZ0/Us/FjQpx+qKu4AZnluleMnV10huvOhgdbAPZkYin1XaX+ytg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1786347702; 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=QHofGfUm9GPK0ALrkOx1L4FzHq4gYtyizd6GWrT6fhI=; b=T5rfiZYuWna1wMptcMfy33Demt+0z7gcBV8FZxP8QRCCoDNLXTJYnxzdSlzTZkH3vmELt9 N3xN/ZZymATmUsCg== From: "tip-bot2 for Niels Pressel" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: core/urgent] rseq: Prevent hard lockup on granted time slice extension Cc: Niels Pressel , Thomas Gleixner , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260802124423.51616-1-npressel@ethz.ch> References: <20260802124423.51616-1-npressel@ethz.ch> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <178634770118.442315.14657763115875285887.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 core/urgent branch of tip: Commit-ID: ada54c2ba652348c590d1ace6a2f4ff77cbbf809 Gitweb: https://git.kernel.org/tip/ada54c2ba652348c590d1ace6a2f4ff77= cbbf809 Author: Niels Pressel AuthorDate: Sun, 02 Aug 2026 14:44:23 +02:00 Committer: Thomas Gleixner CommitterDate: Mon, 10 Aug 2026 09:37:54 +02:00 rseq: Prevent hard lockup on granted time slice extension __exit_to_user_mode_loop() invokes rseq_grant_timeslice_extension() with interrupts enabled. If the extension is granted it invokes hrtimer_rearm_deferred_tif() to ensure that a pending deferred hrtimer rearm is handled before exiting to user space. Though this invokes __hrtimer_rearm_deferred() which expects to be invoked with interrupts disabled as it takes hrtimer_cpu_base::lock with raw_spin_lock(). That's a livelock waiting to happen and caught by lockdep: WARNING: ./include/linux/hrtimer_rearm.h:17 at irqentry_exit, CPU#1: sl= ice_test WARNING: inconsistent lock state inconsistent {IN-HARDIRQ-W} -> {HARDIRQ-ON-W} usage. Prevent this by disabling interrupts around the invocation of hrtimer_rearm_deferred_tif() in rseq_grant_timeslice_extension(). [ tglx: Massaged change log ] Fixes: 15dd3a948855 ("hrtimer: Push reprogramming timers into the interrupt= return path") Signed-off-by: Niels Pressel Signed-off-by: Thomas Gleixner Link: https://patch.msgid.link/20260802124423.51616-1-npressel@ethz.ch --- include/linux/rseq_entry.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/rseq_entry.h b/include/linux/rseq_entry.h index ed9da6e..31ce349 100644 --- a/include/linux/rseq_entry.h +++ b/include/linux/rseq_entry.h @@ -233,6 +233,7 @@ efault: static __always_inline bool rseq_grant_slice_extension(unsigned long ti_wo= rk, unsigned long mask) { if (unlikely(__rseq_grant_slice_extension(ti_work & mask))) { + guard(irq)(); hrtimer_rearm_deferred_tif(ti_work); return true; }