Message ID | 20230724132224.916-1-thunder.leizhen@huaweicloud.com (mailing list archive) |
---|---|
Headers | show
Return-Path: <rcu-owner@vger.kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 37C00C001DE for <rcu@archiver.kernel.org>; Mon, 24 Jul 2023 13:23:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230494AbjGXNXu (ORCPT <rfc822;rcu@archiver.kernel.org>); Mon, 24 Jul 2023 09:23:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230335AbjGXNXt (ORCPT <rfc822;rcu@vger.kernel.org>); Mon, 24 Jul 2023 09:23:49 -0400 Received: from dggsgout11.his.huawei.com (unknown [45.249.212.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C960DF5; Mon, 24 Jul 2023 06:23:47 -0700 (PDT) Received: from mail02.huawei.com (unknown [172.30.67.143]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4R8gpj3RJ1z4f3jqb; Mon, 24 Jul 2023 21:23:41 +0800 (CST) Received: from huaweicloud.com (unknown [10.174.178.55]) by APP4 (Coremail) with SMTP id gCh0CgBn0LNbe75kcavTOg--.2237S4; Mon, 24 Jul 2023 21:23:41 +0800 (CST) From: thunder.leizhen@huaweicloud.com To: "Paul E . McKenney" <paulmck@kernel.org>, Frederic Weisbecker <frederic@kernel.org>, Neeraj Upadhyay <quic_neeraju@quicinc.com>, Joel Fernandes <joel@joelfernandes.org>, Josh Triplett <josh@joshtriplett.org>, Boqun Feng <boqun.feng@gmail.com>, Steven Rostedt <rostedt@goodmis.org>, Mathieu Desnoyers <mathieu.desnoyers@efficios.com>, Lai Jiangshan <jiangshanlai@gmail.com>, Zqiang <qiang.zhang1211@gmail.com>, rcu@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Cc: Zhen Lei <thunder.leizhen@huawei.com> Subject: [PATCH 0/2] softirq: redefine the type of kernel_stat.softirqs[] as unsigned long Date: Mon, 24 Jul 2023 21:22:22 +0800 Message-Id: <20230724132224.916-1-thunder.leizhen@huaweicloud.com> X-Mailer: git-send-email 2.37.3.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: gCh0CgBn0LNbe75kcavTOg--.2237S4 X-Coremail-Antispam: 1UD129KBjvdXoW7Gw17Zw1fXw13Aw13WFy3urg_yoW3Grc_Zw s7tr1UGw1IqFZay3W3Gr47XryjyFWj9F97Cas0qFZ0934qyF98ZFWfAF95Wrsrur4vkFZI vr98ZwnIgw1SvjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbxxYFVCjjxCrM7AC8VAFwI0_Gr0_Xr1l1xkIjI8I6I8E6xAIw20E Y4v20xvaj40_JrC_JFWl1IIY67AEw4v_Jr0_Jr4l8cAvFVAK0II2c7xJM28CjxkF64kEwV A0rcxSw2x7M28EF7xvwVC0I7IYx2IY67AKxVWDJVCq3wA2z4x0Y4vE2Ix0cI8IcVCY1x02 67AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVAFwI0_GcCE3s1l84ACjcxK6I8E87Iv6xkF7I 0E14v26rxl6s0DM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI64kE6c02F40E x7xfMcIj6xIIjxv20xvE14v26r1j6r18McIj6I8E87Iv67AKxVWUJVW8JwAm72CE4IkC6x 0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64vIr41lFIxGxcIEc7CjxVA2Y2ka0xkIwI1lw4CEc2x0 rVAKj4xxMxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrV AFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AKxVWUtVW8ZwCI c40Y0x0EwIxGrwCI42IY6xIIjxv20xvE14v26r1j6r1xMIIF0xvE2Ix0cI8IcVCY1x0267 AKxVW8JVWxJwCI42IY6xAIw20EY4v20xvaj40_WFyUJVCq3wCI42IY6I8E87Iv67AKxVWU JVW8JwCI42IY6I8E87Iv6xkF7I0E14v26r4j6r4UJbIYCTnIWIevJa73UjIFyTuYvjxUFC JmUUUUU X-CM-SenderInfo: hwkx0vthuozvpl2kv046kxt4xhlfz01xgou0bp/ X-CFilter-Loop: Reflected Precedence: bulk List-ID: <rcu.vger.kernel.org> X-Mailing-List: rcu@vger.kernel.org |
Series |
softirq: redefine the type of kernel_stat.softirqs[] as unsigned long
|
expand
|
From: Zhen Lei <thunder.leizhen@huawei.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(-)