From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mta0.migadu.com (out-178.mta0.migadu.com [91.218.175.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BB4B649364D for ; Tue, 25 Aug 2026 01:15:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787620524; cv=none; b=Ho74NI7u01rCsdLdyeMMgrNFiIqPuIeJLUtAMpKHinqwRTpPQe9uJhaHvn8Sa8RH+GNwWTrSpzBZN4bvALav6jMRLQcpbHCKBMVAsBh7NIkMdddtc9TXlNXOdJ/wtNdwGm/Jj2O4oTZL+NJjH8hg9Z3fvSS/3BMHWFbaD+iItaM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787620524; c=relaxed/simple; bh=cR3pdskE3Mi4H0N9IyVRqOMeOF0HY7RVWdsNTorgsBU=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=jqX3+nv1XsM23MEWHRKQTuYaOeVvtiAv/8EpQa5XhCGQ0aW27xH11G2GCZG1Kec9is5/XRCce8tn2nz/z+i+g/3zD0OTRDbOx87mhPHuI7sErmVzGd/gzxa6WGpppDqVd/Y5hpPhYI38qannJwNHnTVBK+dvG6Rvo3AG4dA/nCk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=igORMOiq; arc=none smtp.client-ip=91.218.175.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="igORMOiq" X-Envelope-To: linux-kernel@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=cR3pdskE3Mi4H0N9IyVRqOMeOF0HY7RVWdsNTorgsBU=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1787620519; v=1; x=1788225319; b=igORMOiqSg+3T/shnNqoDWhaFDMwY/iNuWZ/oU7SohWXkxHNEAk7K1vuWP7iNYCtxDV4wjM8 rOgQ8R6F6PUohj9wMj1EcznnqL9U0r7JpvDFFO6u3TpgxTRLl6gyvbjZ4pIpTGmr7oHRo2v+KDm oGsZUexsIreNNwM+Z4/c+SYI= X-Envelope-To: linux-kernel@vger.kernel.org Received: from localhost.localdomain (2408:8411:2498:f2fc:c81f:728:8e62:88e9) by mta12.migadu.com with ESMTPS id c725acdf043e992a; Tue, 25 Aug 2026 01:15:19 +0000 X-Mizu-Trace-ID: c725acdf043e992a X-Migadu-Flow: FLOW_OUT From: Enlin Mu To: peterz@infradead.org, tglx@kernel.org, boqun@kernel.org, lyude@redhat.com, bigeasy@linutronix.de, joelagnelf@nvidia.com, linux-kernel@vger.kernel.org, enlin.mu@unisoc.com, enlin.mu@linux.dev Subject: [PATCH v2] softirq: Remove redundant h->action from preempt_count mismatch error Date: Tue, 25 Aug 2026 09:15:09 +0800 Message-Id: <20260825011509.8505-1-enlin.mu@linux.dev> X-Mailer: git-send-email 2.39.5 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit When a preempt_count mismatch is detected in handle_softirqs(), the error message currently prints the softirq action handler (h->action). However, as Thomas Gleixner pointed out, the action handler for a given softirq vector is always a known, fixed function (e.g., run_timer_softirq for TIMER_SOFTIRQ). Printing it provides zero diagnostic value. The real issue typically lies in the functions invoked *within* that handler, not the handler entry point itself. Therefore, as suggested by Sebastian Andrzej Siewior, remove h->action from the print statement entirely to clean up the error message. Suggested-by: Thomas Gleixner Suggested-by: Sebastian Andrzej Siewior Signed-off-by: Enlin Mu Signed-off-by: Enlin Mu --- v1 -> v2: - Instead of changing %p to %pS, remove h->action from the print entirely as suggested by Sebastian and Thomas. - Update commit message accordingly. v1: https://lore.kernel.org/all/20260105094133.3542-1-enlin.mu@linux.dev/ --- kernel/softirq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/softirq.c b/kernel/softirq.c index 7980a4a232f9..800d81c57302 100644 --- a/kernel/softirq.c +++ b/kernel/softirq.c @@ -645,8 +645,8 @@ static void handle_softirqs(bool ksirqd) h->action(); trace_softirq_exit(vec_nr); if (unlikely(prev_count != preempt_count())) { - pr_err("huh, entered softirq %u %s %p with preempt_count %08x, exited with %08x?\n", - vec_nr, softirq_to_name[vec_nr], h->action, + pr_err("huh, entered softirq %u %s with preempt_count %08x, exited with %08x?\n", + vec_nr, softirq_to_name[vec_nr], prev_count, preempt_count()); preempt_count_set(prev_count); } -- 2.39.5