From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-f42.google.com (mail-it0-f42.google.com [209.85.214.42]) by dpdk.org (Postfix) with ESMTP id 6681C5681 for ; Thu, 29 Sep 2016 21:07:03 +0200 (CEST) Received: by mail-it0-f42.google.com with SMTP id n143so2891018ita.1 for ; Thu, 29 Sep 2016 12:07:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=jnENM5z1i+6t94tKA2vJIk60ikgvs4vTfIRNomkRjdg=; b=GHbLdftXyfbUTao9a8QAtCvzsEMtk8Aq75xrZWE4J2J6UMgcV1hqpfNacJEqZF1vHL P2zHahcpRPKE12zoIKzRGM/XCLj7MNziI+Eoid29/a5daZadKB5eYAOHp+Qn2Z8el0ve xbVYgTa7IJv6J5DqIXgeUsjwwWtGxBdvGy7vo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=jnENM5z1i+6t94tKA2vJIk60ikgvs4vTfIRNomkRjdg=; b=NVOMpR7yV3Z/aqvGrq/6VQz61QM69SSw6Bn0VnmNODWijTblSERGPHAcibzrge6mk3 Z8U62sb6GioYjOmWU2BckVqfm8yZtN5TxP+CxxST0+2HIlX3FqbEG43JBJ2TwSUCQ1Uk Lfh6o++J6kzv1gK/0gzlg3EwvHIRyDgufvQD/pL7wuhj8H1DTxi5AdUpk5l753Nqy3FU E3kTUvGlTAVmLVwiQQolTMXNq8MnYTP04gPljbjvZn+RUKMlDfS4eHPkLtlsl8eVXiBL Y7wlQ0HrDaKHrR0Sa/OPBeObr6jdYSJxwPC+zK73tX637K7MT2cjwnJeTf93k3R2+jIS /0kw== X-Gm-Message-State: AA6/9Rl647nAWvTOQTg7xBFJqv2vORPomO70m1Y5fzJ3w1BSO44dD9S7YkDmQZ2iY2xWI5jethNtMJh3tIa8Pv13 X-Received: by 10.36.88.83 with SMTP id f80mr298798itb.36.1475176022573; Thu, 29 Sep 2016 12:07:02 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.195.225 with HTTP; Thu, 29 Sep 2016 12:06:22 -0700 (PDT) In-Reply-To: <1475170776-10130-3-git-send-email-linville@tuxdriver.com> References: <1475090404-20707-1-git-send-email-linville@tuxdriver.com> <1475170776-10130-1-git-send-email-linville@tuxdriver.com> <1475170776-10130-3-git-send-email-linville@tuxdriver.com> From: Ajit Khaparde Date: Thu, 29 Sep 2016 14:06:22 -0500 Message-ID: To: "John W. Linville" Cc: dev@dpdk.org, dpdk stable Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH v2 2/4] net/bnxt: ensure entry_length is unsigned in bnxt_alloc_vnic_attributes X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Sep 2016 19:07:03 -0000 On Thu, Sep 29, 2016 at 12:39 PM, John W. Linville wrote: > Otherwise, the inherent cast when multiplying entry_length by max_vnics > in the call to rte_memzone_reserve could promote max_vnics to a signed > value, causing hilarity to ensue... > > Coverity issue: 127557 > Fixes: 9738793f28ec ("net/bnxt: add VNIC functions and structs") > > Signed-off-by: John W. Linville > =E2=80=8BAcked -by: Ajit Khaparde --- > v2: fix-up changelog entries based-on comments from Ferruh Yigit > > drivers/net/bnxt/bnxt_vnic.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/bnxt/bnxt_vnic.c b/drivers/net/bnxt/bnxt_vnic.c > index c04c4c740645..1b5f54c4d1ae 100644 > --- a/drivers/net/bnxt/bnxt_vnic.c > +++ b/drivers/net/bnxt/bnxt_vnic.c > @@ -175,7 +175,7 @@ int bnxt_alloc_vnic_attributes(struct bnxt *bp) > struct rte_pci_device *pdev =3D bp->pdev; > const struct rte_memzone *mz; > char mz_name[RTE_MEMZONE_NAMESIZE]; > - int entry_length =3D RTE_CACHE_LINE_ROUNDUP( > + uint16_t entry_length =3D RTE_CACHE_LINE_ROUNDUP( > HW_HASH_INDEX_SIZE * > sizeof(*vnic->rss_table) + > HW_HASH_KEY_SIZE); > uint16_t max_vnics; > -- > 2.7.4 > >