From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-f45.google.com (mail-it0-f45.google.com [209.85.214.45]) by dpdk.org (Postfix) with ESMTP id 6C2596C94 for ; Mon, 10 Oct 2016 20:42:30 +0200 (CEST) Received: by mail-it0-f45.google.com with SMTP id l13so80051273itl.1 for ; Mon, 10 Oct 2016 11:42:30 -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=6bI9U3/yEOj57N4Cnw6cjoutBhPWV/Qfey8syFCr2vQ=; b=dl87NnrBl9k3z5fSNArVS347ENHnKqyd+WBFLy7sw2gZVT2mh2ZQU6V4QT/8W0gi7p yMX3azsVMGtRufa5DvMoB/r37pDSyLh6pJC2duv2jZR//mcr3/0s4d6C786+qWw60JL8 X3jxqafnTH0dBvjQYC564I+0u4HqYzqm9yCD4= 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=6bI9U3/yEOj57N4Cnw6cjoutBhPWV/Qfey8syFCr2vQ=; b=RzHJ2y+Iqct1nl5Lu6PKOLhCrCkf30PFNZW/dHDdfCiHocPNp24Xaoe/DoK8jiksCy sNvV+8Q8UlIP5AiMa/5ZSgjA9cHpbTq096bP6/K2tMV4GtHRrGePgwobcutu9LHVdXbs AiTqq9BLyVvZHF9JJoddZnIquMtQl0b2XnqmKMoCyo+TurKWQ1dlHe5iFQgGsR4rgFaz 7Y0GsM4SpyXrP1omCpKfasiVTv9TicgcwZ3o8/91FLs4qrHV3rVP84giIxnBIaG82osb sghxTa1IgEckdSxGlfBKft209xpTCo8IgDxM1tAzPPmD01Ug8ujyIk1s5iZI0sbyeCET IbHQ== X-Gm-Message-State: AA6/9RlAQ9osXrstwFkJQ51FCIlPL7cMCjyjQFziRo7VlKkQPxGujAC8DmwJJvwPiUAjAPZ/qBEZyaP+yXo+BFsS X-Received: by 10.36.233.65 with SMTP id f62mr12098829ith.36.1476124949575; Mon, 10 Oct 2016 11:42:29 -0700 (PDT) MIME-Version: 1.0 Received: by 10.64.225.40 with HTTP; Mon, 10 Oct 2016 11:41:49 -0700 (PDT) In-Reply-To: <1475170776-10130-5-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-5-git-send-email-linville@tuxdriver.com> From: Ajit Khaparde Date: Mon, 10 Oct 2016 13:41:49 -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-dev] [PATCH v2 4/4] net/bnxt: add ULL suffix to constant 1 for bit shift in bnxt_mac_addr_remove_op X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Oct 2016 18:42:30 -0000 On Thu, Sep 29, 2016 at 12:39 PM, John W. Linville wrote: > Some(?) compilers will treat the unmarked constant 1 as a 32-bit > integer, but the shift operation is in a loop that could run up to > 63 times -- undefined behavior! > > Coverity issue: 127546 > Fixes: 778b759ba10e ("net/bnxt: add MAC address") > > 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_ethdev.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethde= v > .c > index f4eedfd812bb..d7447b15983b 100644 > --- a/drivers/net/bnxt/bnxt_ethdev.c > +++ b/drivers/net/bnxt/bnxt_ethdev.c > @@ -463,7 +463,7 @@ static void bnxt_mac_addr_remove_op(struct rte_eth_de= v > *eth_dev, > * remove the corresponding MAC addr filter > */ > for (i =3D 0; i < MAX_FF_POOLS; i++) { > - if (!(pool_mask & (1 << i))) > + if (!(pool_mask & (1ULL << i))) > continue; > > STAILQ_FOREACH(vnic, &bp->ff_pool[i], next) { > -- > 2.7.4 > >