From: Zhen Lei <thunder.leizhen@huawei.com>
To: "Paul E . McKenney" <paulmck@kernel.org>,
Frederic Weisbecker <frederic@kernel.org>,
Neeraj Upadhyay <quic_neeraju@quicinc.com>,
"Josh Triplett" <josh@joshtriplett.org>,
Steven Rostedt <rostedt@goodmis.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Lai Jiangshan <jiangshanlai@gmail.com>,
Joel Fernandes <joel@joelfernandes.org>, <rcu@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Cc: Zhen Lei <thunder.leizhen@huawei.com>, Robert Elliott <elliott@hpe.com>
Subject: [PATCH v4 1/4] genirq: Fix the return type of kstat_cpu_irqs_sum()
Date: Fri, 4 Nov 2022 10:12:20 +0800 [thread overview]
Message-ID: <20221104021224.102-2-thunder.leizhen@huawei.com> (raw)
In-Reply-To: <20221104021224.102-1-thunder.leizhen@huawei.com>
The type of member irqs_sum is unsigned long, so kstat_cpu_irqs_sum()
should also return unsigned long. Otherwise, the value maybe truncated.
Fixes: f2c66cd8eedd ("/proc/stat: scalability of irq num per cpu")
Reported-by: Elliott, Robert (Servers) <elliott@hpe.com>
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
include/linux/kernel_stat.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/kernel_stat.h b/include/linux/kernel_stat.h
index ddb5a358fd829f4..90e2fdc17d79ff8 100644
--- a/include/linux/kernel_stat.h
+++ b/include/linux/kernel_stat.h
@@ -75,7 +75,7 @@ extern unsigned int kstat_irqs_usr(unsigned int irq);
/*
* Number of interrupts per cpu, since bootup
*/
-static inline unsigned int kstat_cpu_irqs_sum(unsigned int cpu)
+static inline unsigned long kstat_cpu_irqs_sum(unsigned int cpu)
{
return kstat_cpu(cpu).irqs_sum;
}
--
2.25.1
next prev parent reply other threads:[~2022-11-04 2:12 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-04 2:12 [PATCH v4 0/4] rcu: Add RCU stall diagnosis information Zhen Lei
2022-11-04 2:12 ` Zhen Lei [this message]
2022-11-04 2:12 ` [PATCH v4 2/4] sched: Add helper kstat_cpu_softirqs_sum() Zhen Lei
2022-11-04 2:12 ` [PATCH v4 3/4] sched: Add helper nr_context_switches_cpu() Zhen Lei
2022-11-04 2:12 ` [PATCH v4 4/4] rcu: Add RCU stall diagnosis information Zhen Lei
2022-11-04 3:12 ` Leizhen (ThunderTown)
2022-11-04 13:43 ` Paul E. McKenney
2022-11-05 1:58 ` Elliott, Robert (Servers)
2022-11-05 7:03 ` Leizhen (ThunderTown)
2022-11-05 20:32 ` Paul E. McKenney
2022-11-07 3:20 ` Leizhen (ThunderTown)
2022-11-05 20:06 ` Paul E. McKenney
2022-11-07 2:10 ` Elliott, Robert (Servers)
2022-11-07 11:49 ` Leizhen (ThunderTown)
2022-11-07 20:38 ` Elliott, Robert (Servers)
2022-11-07 21:57 ` Elliott, Robert (Servers)
2022-11-08 3:06 ` Leizhen (ThunderTown)
2022-11-08 5:53 ` Elliott, Robert (Servers)
2022-11-08 6:41 ` Leizhen (ThunderTown)
2022-11-08 19:29 ` Elliott, Robert (Servers)
2022-11-08 3:18 ` Leizhen (ThunderTown)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221104021224.102-2-thunder.leizhen@huawei.com \
--to=thunder.leizhen@huawei.com \
--cc=elliott@hpe.com \
--cc=frederic@kernel.org \
--cc=jiangshanlai@gmail.com \
--cc=joel@joelfernandes.org \
--cc=josh@joshtriplett.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=paulmck@kernel.org \
--cc=quic_neeraju@quicinc.com \
--cc=rcu@vger.kernel.org \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®