Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp30929imm; Thu, 10 May 2018 14:54:43 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrvYHX24+OGti/GvFTI6Tayk/sijpDSheTmngGMFkU+6qL35TbPpWdsXS57rxEEmHP9CdMa X-Received: by 2002:a63:b54b:: with SMTP id u11-v6mr2357766pgo.365.1525989283390; Thu, 10 May 2018 14:54:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525989283; cv=none; d=google.com; s=arc-20160816; b=zqqZ4qBmjcLC3X9WlEQii00PrUh0yzBBu0goQDOrflqZbV1Ex6RaLPChrkOkfSZPHU Xn6dlbko13q5NVmZUZWgE1BcrVL09wZ1sm8hFEkhqW3QkryvCSJ9/38tCkpzvKTJUE/t AifNfUN/aZPu0bf3ZzH403p1FP37U/TXOc4yNH3/3lQ4LFu5yEw5kOSPKVQ6Ogv802yD 3KDVrQzKPHNCbh7GuwOHQFzuaWEtnJd8GZ6OaIHsdDF5SZ3XTCREQfx1BnExMIt0WhRa eMXwMMOUWc8eOwJN2kV0CrPR3NSZEfNaXsYI2a207yG6eyekA6dxSuisauWrwZvjVx0H 6Jvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date :arc-authentication-results; bh=oLlcpUZZFiQSL582s02msWbDbrMV/pdz/0/0b85sm9o=; b=nBnblilZu2n/qLN7WAcOCgzWpdPTrs0QtLg8aAwvZnLgxYMDpnA4cbI4+sp4Q32Ozm 9vFaOQiiWsocuVsPuEEVWyIV/Sub8NMgzLNveJNCsuASEWS75pEgv8oa6q0HyweW8JGY o3+iZk/D8LxuMPhKFyu8s4tpMuBSXY2tparb8j2ctU57C06IviwRpWX8CwaGW8I1YkpJ oNQWX7OFxYmKzWRlHhtNkw3HpK9OOWlYn7g8Dv+qzg+8m1oOuMTnfa1Ddq2RJ/4Q8o9h U/+pCiNLnWHNxGmiMP7AD+wD9tviCH2+VEn3t4oHPmCjh782SMxydILEx3dzVaD/MTfo OgKg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p7-v6si1341483pgv.372.2018.05.10.14.54.18; Thu, 10 May 2018 14:54:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752663AbeEJVyC (ORCPT + 99 others); Thu, 10 May 2018 17:54:02 -0400 Received: from shards.monkeyblade.net ([184.105.139.130]:37856 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752412AbeEJVyA (ORCPT ); Thu, 10 May 2018 17:54:00 -0400 Received: from localhost (67.110.78.66.ptr.us.xo.net [67.110.78.66]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id C5DF1133E8164; Thu, 10 May 2018 14:53:59 -0700 (PDT) Date: Thu, 10 May 2018 17:53:58 -0400 (EDT) Message-Id: <20180510.175358.1296757435086922873.davem@davemloft.net> To: colin.king@canonical.com Cc: igor.russkikh@aquantia.com, pavel.belous@aquantia.com, weiyongjun1@huawei.com, netdev@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH][next] net: aquantia: fix unsigned numvecs comparison with less than zero From: David Miller In-Reply-To: <20180510125201.19707-1-colin.king@canonical.com> References: <20180510125201.19707-1-colin.king@canonical.com> X-Mailer: Mew version 6.7 on Emacs 25.3 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Thu, 10 May 2018 14:54:00 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Colin King Date: Thu, 10 May 2018 13:52:01 +0100 > From: Colin Ian King > > The comparison of numvecs < 0 is always false because numvecs is a u32 > and hence the error return from a failed call to pci_alloc_irq_vectores > is never detected. Fix this by using the signed int ret to handle the > error return and assign numvecs to err. > > Detected by CoverityScan, CID#1468650 ("Unsigned compared against 0") > > Fixes: a09bd81b5413 ("net: aquantia: Limit number of vectors to actually allocated irqs") > Signed-off-by: Colin Ian King This doesn't apply to net-next.