Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp997604rwb; Thu, 8 Dec 2022 05:42:51 -0800 (PST) X-Google-Smtp-Source: AA0mqf57dnpslNPtbDvd/qEt5tiOWcM+s+2niZJ8PUAhyA7SuqmZ/y4lsA3HyFsLgvryTn5pu1K+ X-Received: by 2002:a05:6a02:41:b0:478:6785:7df7 with SMTP id az1-20020a056a02004100b0047867857df7mr31520609pgb.168.1670506971227; Thu, 08 Dec 2022 05:42:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670506971; cv=none; d=google.com; s=arc-20160816; b=NvYOdskVvmN6KJ003Pev+dqIQm+d1+wR7Fp0iLZ1Phy20Jx3Tpk7B/U1CeR3iMS1fr mQJzMthOgp7NsleJX/oE03kCI+afG/Wdy36p/sH/2muE013CflO5s78F75liU7l/joXy vKH6XVO8G9Ou05Humye1YMCaHWvJtmjr2ERw39baaY9T3hOIHuOzHu3udKDzYnjOYi+M 9UMC5WCQmMZGutI9qpfiEOv5UVzcw94JrARNR7ij56Co9T47x64QO7V/ZKb/lpmvcgYE J6eFLfl1ahCW5XImJprzyNmTPlAN2CPFI7CQm9R3gocJzcI2OitjfaFRLOY7j/t93/9r fLxw== 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:subject:cc:to:from; bh=QVsFXZOURowc4/JgTC9FtlhiQQhqvT9TccG73miLPjk=; b=MXejiZYazkGA5fnWMKsPbNSdaDEFuKSaphhB9UHie2cv9ryjuAWo7Vq3YmGtSnwEKc WCrmRXJG8UL/J4/ll7kP+b2pDO1IxN1vYB7Beg4mYAq7bLZWP4oDIdmvsIYE2t+bQ+Y2 mm06yCnM8fYCJNat5umDvbE1KN/CIlIu8SccCMN1WnbNoDgDQTJp1PPEdxmJPnhvLfYw hQ4DcjgcOYNDKf2vcdEdflW7F0sqO2qSpkPXXZ9lBQFuJWDAS4UnpwsQ9oGKiGKgEvzH CydkQoIuPVXIzZoC75e+ZA1IdqfYmiMFRB+eiR36fPCXSEhSCicsW84BO+nSiU8Y+F5S rVMA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t9-20020a17090340c900b00188bee6e9f2si23607460pld.239.2022.12.08.05.42.42; Thu, 08 Dec 2022 05:42:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230103AbiLHMwh (ORCPT + 72 others); Thu, 8 Dec 2022 07:52:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230094AbiLHMwf (ORCPT ); Thu, 8 Dec 2022 07:52:35 -0500 Received: from cstnet.cn (smtp84.cstnet.cn [159.226.251.84]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 72C323894; Thu, 8 Dec 2022 04:52:33 -0800 (PST) Received: from localhost.localdomain (unknown [124.16.138.125]) by APP-05 (Coremail) with SMTP id zQCowABXr+z73ZFjRwTKBQ--.40875S2; Thu, 08 Dec 2022 20:52:11 +0800 (CST) From: Jiasheng Jiang To: jiri@resnulli.us Cc: leon@kernel.org, jesse.brandeburg@intel.com, anthony.l.nguyen@intel.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Jiasheng Jiang Subject: Re: [PATCH net v2] ice: Add check for kzalloc Date: Thu, 8 Dec 2022 20:52:00 +0800 Message-Id: <20221208125200.13263-1-jiasheng@iscas.ac.cn> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: zQCowABXr+z73ZFjRwTKBQ--.40875S2 X-Coremail-Antispam: 1UD129KBjDUn29KB7ZKAUJUUUUU529EdanIXcx71UUUUU7v73 VFW2AGmfu7bjvjm3AaLaJ3UjIYCTnIWjp_UUUYf7AC8VAFwI0_Gr0_Xr1l1xkIjI8I6I8E 6xAIw20EY4v20xvaj40_Wr0E3s1l1IIY67AEw4v_Jr0_Jr4l8cAvFVAK0II2c7xJM28Cjx kF64kEwVA0rcxSw2x7M28EF7xvwVC0I7IYx2IY67AKxVWUCVW8JwA2z4x0Y4vE2Ix0cI8I cVCY1x0267AKxVW8JVWxJwA2z4x0Y4vEx4A2jsIE14v26F4UJVW0owA2z4x0Y4vEx4A2js IEc7CjxVAFwI0_GcCE3s1le2I262IYc4CY6c8Ij28IcVAaY2xG8wAqx4xG64xvF2IEw4CE 5I8CrVC2j2WlYx0E2Ix0cI8IcVAFwI0_Jr0_Jr4lYx0Ex4A2jsIE14v26r4j6F4UMcvjeV CFs4IE7xkEbVWUJVW8JwACjcxG0xvY0x0EwIxGrwACjI8F5VA0II8E6IAqYI8I648v4I1l FIxGxcIEc7CjxVA2Y2ka0xkIwI1lc2xSY4AK67AK6ryUMxAIw28IcxkI7VAKI48JMxC20s 026xCaFVCjc4AY6r1j6r4UMI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_ JrI_JrWlx4CE17CEb7AF67AKxVWUtVW8ZwCIc40Y0x0EwIxGrwCI42IY6xIIjxv20xvE14 v26r1j6r1xMIIF0xvE2Ix0cI8IcVCY1x0267AKxVW8JVWxJwCI42IY6xAIw20EY4v20xva j40_Jr0_JF4lIxAIcVC2z280aVAFwI0_Jr0_Gr1lIxAIcVC2z280aVCY1x0267AKxVW8JV W8JrUvcSsGvfC2KfnxnUUI43ZEXa7VUjsjjDUUUUU== X-Originating-IP: [124.16.138.125] X-CM-SenderInfo: pmld2xxhqjqxpvfd2hldfou0/ X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Dec 08, 2022 at 07:17:59PM +0800, Leon Romanovsky wrote: >>>> +err_out: >>>> + for (j = 0; j < i; j++) { >>> >>> You don't need an extra variable, "while(i--)" will do the trick. >> >>No, the right range is [0, i - 1], but the "while(i--)" is [1, i]. > > Are you sure?? Yes, you are right. I will submit a v3 to add this change. Thanks, Jiang