[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230724132224.916-1-thunder.leizhen@huaweicloud.com>
Date: Mon, 24 Jul 2023 21:22:22 +0800
From: thunder.leizhen@...weicloud.com
To: "Paul E . McKenney" <paulmck@...nel.org>,
Frederic Weisbecker <frederic@...nel.org>,
Neeraj Upadhyay <quic_neeraju@...cinc.com>,
Joel Fernandes <joel@...lfernandes.org>,
Josh Triplett <josh@...htriplett.org>,
Boqun Feng <boqun.feng@...il.com>,
Steven Rostedt <rostedt@...dmis.org>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Lai Jiangshan <jiangshanlai@...il.com>,
Zqiang <qiang.zhang1211@...il.com>, rcu@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Cc: Zhen Lei <thunder.leizhen@...wei.com>
Subject: [PATCH 0/2] softirq: redefine the type of kernel_stat.softirqs[] as unsigned long
From: Zhen Lei <thunder.leizhen@...wei.com>
The type of member softirqs in structure kernel_stat is unsigned int, its
accumulated value can easily overflow. Changing to unsigned long can safely
solve the problem on 64-bit processors.
struct kernel_stat {
unsigned long irqs_sum;
- unsigned int softirqs[NR_SOFTIRQS];
+ unsigned long softirqs[NR_SOFTIRQS];
Zhen Lei (2):
softirq: fix integer overflow in function show_stat()
softirq: redefine the type of kernel_stat.softirqs[] as unsigned long
fs/proc/softirqs.c | 2 +-
fs/proc/stat.c | 4 ++--
include/linux/kernel_stat.h | 8 ++++----
kernel/rcu/tree.h | 2 +-
kernel/rcu/tree_stall.h | 6 +++---
5 files changed, 11 insertions(+), 11 deletions(-)
--
2.25.1
Powered by blists - more mailing lists