Message ID | 20221119092508.1766-2-thunder.leizhen@huawei.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 51b25738acd6703f9ecd8f559de62dcd50918dbb |
Headers | show |
Series | rcu: Add RCU stall diagnosis information | expand |
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; }
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(-)