[PATCH 0/2] softirq: redefine the type of kernel_stat.softirqs[] as unsigned long

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Zhen Lei <thunder.leizhen@xxxxxxxxxx>

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




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux