Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp603837pxb; Tue, 14 Sep 2021 04:58:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwWndS9S9NKV/igQ8XlqkvXHYu1CalBWzjiL8WikyUEKYait3GqYFT39ABNSYjo/LY/nBQb X-Received: by 2002:a05:6512:792:: with SMTP id x18mr10673347lfr.191.1631620717655; Tue, 14 Sep 2021 04:58:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631620717; cv=none; d=google.com; s=arc-20160816; b=pZ6o68ar2RPsEid5Az1u6iQvo6eMBXTDhOwrwsiBQwQtjdUjNhTHxVB/YYG5m3/Vcq qPXos2Uvbo8r3O906J4UZ4l0VlVd7TCP5D753g9XQicIlHET69c2EbTtJdk5vhSETIWx IJ0n8O7N1UkxfgTT7OjETgzrtPib52SdxN5GnJsPgCWC4iWoRvl2KdFaX07gVuHPkDod 4cH//oLHbZwJi6ig0oKS/tSxlhjVsL8KsJ9FJwJ3kkFAuQxUqvz48N8lbFdEij2HzCPw 8Ls9VZr/WmKtA/jcSfNZYlXwnQbWJL7E2IwwA2DLjdxH7Edv+pQWXIoH+xJfAR8Ith9B UeqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:references:in-reply-to:subject:cc:to:dkim-signature :dkim-signature:from; bh=zgr1WY0ptWXwp1GY0AayvdB+LemAOWeDFerYEs3bOh4=; b=k6gR36H05Pt+8Gjaogxatm6ZIOy6brRFBT8TRkk+EJftsEMl9GXQf32iCu/TJNEV3O Mup09xQB32EYlfYscNflTTSdW6mm8HwBVANAkXghb9yN+zwADLEztXjMMn0u5jKikVG3 1l8MkqAev6CnaqQz8lxofwJSG91aDu7Wv8kMGWBGE2q7SNYDoC5e5AOJjd98zqFKDQQ3 BxFbqoTPVLWO7DNqMcmAhxcbIoogBkwgjADky+gct9itL4LpbSECC4jrnnbHK1e8z2Tq KqDzvTOufQWkt1Rc7sLrbu9/r7V/sGBgW8u95+/8k3XPElsP84DCO1oVJV3pihx30gLj FcuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=g6VnGSeX; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p9si11918083lfe.273.2021.09.14.04.58.10; Tue, 14 Sep 2021 04:58:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=g6VnGSeX; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232198AbhINL5y (ORCPT + 99 others); Tue, 14 Sep 2021 07:57:54 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:33086 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232065AbhINL5w (ORCPT ); Tue, 14 Sep 2021 07:57:52 -0400 From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1631620594; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zgr1WY0ptWXwp1GY0AayvdB+LemAOWeDFerYEs3bOh4=; b=g6VnGSeXbdoyzc23BO2nmG1RNmf+wWQU4cMW6LKq3h9z3ouDUpuWB8GYSY86TSpXFnjh0H kQphiQw5hKuj1pqGaezBc4fcLMn/okHWEPcS41ivSIn98DLYBv1HMy0OBaMmbSeLT2yApR pVRJ7SjJYL9GvrGUB/YTtyY/zLyUmDz7nCXVk9lceHlVVQWrWvsjvIdvxtx1eWgUHpbPWr WZsQBCbI33+Z4/ubtHv0ezKxzq1P1y0pPVbjwWnA8v1maVmyad9xihkUT4sJqsbcCS2OeB dUG1JMjGiXn2OgXj8qPtYjIANiwBfHa4GageC2dRi07B5gYZNO7VkO91AniumQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1631620594; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zgr1WY0ptWXwp1GY0AayvdB+LemAOWeDFerYEs3bOh4=; b=FpZYy1fZzpPSixu+14fWVAgjbLNpKR1OdIs6JBtsBOTSJb6T7mQ0Qik/gMOq34h37tfD71 UQs53VSc+poQ+9AA== To: Bixuan Cui , linux-kernel@vger.kernel.org Cc: maz@kernel.org, john.wanghui@huawei.com Subject: Re: [PATCH -next] irqdomain: fix overflow error In-Reply-To: <20210908014623.61357-1-cuibixuan@huawei.com> References: <20210908014623.61357-1-cuibixuan@huawei.com> Date: Tue, 14 Sep 2021 13:56:34 +0200 Message-ID: <87o88vcqvh.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 08 2021 at 09:46, Bixuan Cui wrote: > In function =E2=80=98kmalloc_node=E2=80=99, > inlined from =E2=80=98kzalloc_node.constprop=E2=80=99 at ./include/li= nux/slab.h:743:9, > inlined from =E2=80=98__irq_domain_add=E2=80=99 at kernel/irq/irqdoma= in.c:153:9: > ./include/linux/slab.h:618:9: error: argument 1 value =E2=80=981844674407= 3709551615=E2=80=99 exceeds maximum object size 9223372036854775807 [-Werro= r=3Dalloc-size-larger-than=3D] > return __kmalloc_node(size, flags, node); > > The 'size' can be negative here, which will then get turned into a giant > size argument for kzalloc_node(). Changing the size to 'unsigned int' > instead seems more appropriate. What's more appropriate about that? Thanks, tglx