Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 36A081F9F70 for ; Sun, 1 Mar 2026 01:26:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772328392; cv=none; b=LsoO8AQ03NP0lprMPDk9BO3KWEdgvoqjuJdiQPXdEaf8piFcXlkreSl4mPZCccnOS5oqIhbTMy5uVngGAaug7QY2YPS19NU0VaLqiJpLeUzd5VW5rWD7mewVQRmD0WiwkqKtPKC7t9mcjSIP4MCFXEiqNdkmtAIG4wDdCT0dXzY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772328392; c=relaxed/simple; bh=n3TpooueMfRLxjtqOx3t/UWIQR+wKbX5Wj8YMYzqdic=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=I16cY4/ajYLOGeORnUWrDVQTGjj8DwDKeDpouvWoYqJv/tpd7fJbS1FHF4dIyOMkjNZRKt+M3FJxXtISgSuCrbAtUFPsqRp9xgjfAEHkI0OdMkvygt6w1fZhCNtnsVRUmfuE7XK6HL6KEuWWyj30Wfb/YdsYyyoCVABN057k3ZY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=P6U/XRM1; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="P6U/XRM1" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4A2A2C19424; Sun, 1 Mar 2026 01:26:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1772328392; bh=n3TpooueMfRLxjtqOx3t/UWIQR+wKbX5Wj8YMYzqdic=; h=From:To:Cc:Subject:Date:From; b=P6U/XRM1s6VpLP9sa3vwjufwgECe8bToZwY+MzcOw6KWKKjo9PSrsbETaFVfw3hh7 pMpBDQgJaEU3lhWOgVR6XMdboXu9YNF7yYEVGk7H8N9WhhgGfjzh3I+bmOShmJwUGk REcbDkAFitm4YbVvSa2w6aaweionK1tj/yUhhInQLJM37YGzhVnSK+RHJ3XqHt8RiE IVC4UXYnbg7S1Dln/LX7ud7DA6/x52E1cwgKhf7JenWL+c8Jqsl3F7EIMIoPW/NWx2 xQod/DbVRJSULWS6R7+mPDu6yqkDOjGBCbuHcFsp6eZmo0DLua6Y6M/RGwwrS0u9tx VBrMf2z5GkVxg== From: Sasha Levin To: stable@vger.kernel.org, hu.shengming@zte.com.cn Cc: Petr Mladek , Ingo Molnar , Mark Brown , Thomas Gleixner , Zhang Run , Andrew Morton Subject: FAILED: Patch "watchdog/softlockup: fix sample ring index wrap in need_counting_irqs()" failed to apply to 6.12-stable tree Date: Sat, 28 Feb 2026 20:26:29 -0500 Message-ID: <20260301012630.1683887-1-sashal@kernel.org> X-Mailer: git-send-email 2.51.0 Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Hint: ignore X-stable: review Content-Transfer-Encoding: 8bit The patch below does not apply to the 6.12-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . Thanks, Sasha ------------------ original commit in Linus's tree ------------------ From cafe4074a7221dca2fa954dd1ab0cf99b6318e23 Mon Sep 17 00:00:00 2001 From: Shengming Hu Date: Mon, 19 Jan 2026 21:59:05 +0800 Subject: [PATCH] watchdog/softlockup: fix sample ring index wrap in need_counting_irqs() cpustat_tail indexes cpustat_util[], which is a NUM_SAMPLE_PERIODS-sized ring buffer. need_counting_irqs() currently wraps the index using NUM_HARDIRQ_REPORT, which only happens to match NUM_SAMPLE_PERIODS. Use NUM_SAMPLE_PERIODS for the wrap to keep the ring math correct even if the NUM_HARDIRQ_REPORT or NUM_SAMPLE_PERIODS changes. Link: https://lkml.kernel.org/r/tencent_7068189CB6D6689EB353F3D17BF5A5311A07@qq.com Fixes: e9a9292e2368 ("watchdog/softlockup: Report the most frequent interrupts") Signed-off-by: Shengming Hu Reviewed-by: Petr Mladek Cc: Ingo Molnar Cc: Mark Brown Cc: Thomas Gleixner Cc: Zhang Run Cc: Signed-off-by: Andrew Morton --- kernel/watchdog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/watchdog.c b/kernel/watchdog.c index b4d5fbdb933a2..7d675781bc917 100644 --- a/kernel/watchdog.c +++ b/kernel/watchdog.c @@ -550,7 +550,7 @@ static bool need_counting_irqs(void) u8 util; int tail = __this_cpu_read(cpustat_tail); - tail = (tail + NUM_HARDIRQ_REPORT - 1) % NUM_HARDIRQ_REPORT; + tail = (tail + NUM_SAMPLE_PERIODS - 1) % NUM_SAMPLE_PERIODS; util = __this_cpu_read(cpustat_util[tail][STATS_HARDIRQ]); return util > HARDIRQ_PERCENT_THRESH; } -- 2.51.0