From nobody Mon Jun 8 07:26:03 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 BD22540962E; Thu, 4 Jun 2026 18:45: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=1780598746; cv=none; b=tbadSjCj2pR5g5H6vzAnTsZnwu/yM0gzYeau0ns3zEGOPrRmCDFYFZUytBiEjI6u7z6PIErtYT2xiAVLfV7A00U5XQI4IylCOl34MAwLyl2ZKd93nc5Q8cQ3hDwv6/Kao3VSzHGnoZbmd4ti42bOAJRCXnaz60RW5WX0YMA1hUE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780598746; c=relaxed/simple; bh=uArPhPmFZ5J/638BEPERe7yCtd81L32luTNP8/xT4rM=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=sSAx8OWltWejxdiOAL8fBE3b4trRExOu/ZAWny91jyvoCyJ+4jwvZnaM5Cszni67kylb4sc9MfNj2HFKLqXIGK4PG38nG3GNVHWxD7vEOFEdthb95VQgADbwbWZbwBP1LxR6dSmfWJQZKfCTcKr6hDoFQW3Rf1Rm5N8jF67ihdM= 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=Pa6K9W7d; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=usOH47sv; 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="Pa6K9W7d"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="usOH47sv" Date: Thu, 04 Jun 2026 18:45:41 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1780598743; 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=1dHnQnZeGnJNOIQ0tLmPbDRIIanPzohLh9N1OjJ8HPA=; b=Pa6K9W7dMGF1N3p15jEMiJcf4lKQuUtqDSWs9OsVDTBj7TUAdxwmVCvDXXp5PdEOPPGi03 qNyJDdAyQkLlvoEEefdOsiZgv982/nHCm2bBHVvV86mnrKgzx28SZSXO+7rXSPAFE3VrEz q56w18vGPtonT1WpJMC4gM1r2IAfV2Wf3yGEkNoT0GCi/8XiJ+/6hGfdOuuSxEgFqMn/oP 7yWFh6oVn8yHA48sAfP/iuWegV7HbB2XUqOVDAwytcppQwnRRwAaw6C25XQvYjClg+WvMv N42madrvTvx9xzCiDGfPGm7pVnCjsxhpj43PFr5Dj0dZPdCIZskFrOgI0e9A+w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1780598743; 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=1dHnQnZeGnJNOIQ0tLmPbDRIIanPzohLh9N1OjJ8HPA=; b=usOH47svzuiUXLBGifDkolRRBZiJa3ZIBbOKpVuVpGpw9x90IpeoOIQv0W3s6PHdC0frG3 +T4gnIJ24xYcI9Bg== 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: sched/core] sched: Be more strict about p->is_blocked Cc: "Peter Zijlstra (Intel)" , John Stultz , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260526113322.364017314@infradead.org> References: <20260526113322.364017314@infradead.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <178059874186.710.13223757755315023483.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 sched/core branch of tip: Commit-ID: 708024b575b4ea58c5956e7c09f2d2f48facd478 Gitweb: https://git.kernel.org/tip/708024b575b4ea58c5956e7c09f2d2f48= facd478 Author: Peter Zijlstra AuthorDate: Tue, 26 May 2026 11:32:34 +02:00 Committer: Peter Zijlstra CommitterDate: Tue, 02 Jun 2026 12:26:08 +02:00 sched: Be more strict about p->is_blocked Upon entry to try_to_block_task(), p->is_blocked should be false. After all, the prior wakeup would have made it so per ttwu_do_wakeup(). Ensure this is the case, rather than clearing it in the path that doesn't s= et it. Signed-off-by: Peter Zijlstra (Intel) Acked-by: John Stultz Link: https://patch.msgid.link/20260526113322.364017314%40infradead.org --- kernel/sched/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/sched/core.c b/kernel/sched/core.c index a06d5a5..8b7eb12 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -6676,8 +6676,9 @@ static bool try_to_block_task(struct rq *rq, struct t= ask_struct *p, { unsigned long task_state =3D *task_state_p; =20 + WARN_ON_ONCE(p->is_blocked); + if (signal_pending_state(task_state, p)) { - p->is_blocked =3D 0; WRITE_ONCE(p->__state, TASK_RUNNING); *task_state_p =3D TASK_RUNNING; clear_task_blocked_on(p, NULL);