From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-f41.google.com (mail-it0-f41.google.com [209.85.214.41]) by dpdk.org (Postfix) with ESMTP id 56C016A95 for ; Mon, 10 Oct 2016 20:42:30 +0200 (CEST) Received: by mail-it0-f41.google.com with SMTP id e203so21737622itc.0 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=FGxOuru0qrUmuRm4+5k6cbDbXXtzpdQ2NU4IYCOcm4kVla0YcVhaE1al4eKW2K0U1c yWD33CuJo+/9+n4zJf1mnuLcStlQx9v0YoiygYrjXaib7Ap/tzC98bVdr/Wh4WdYWOTb rA2QDxO53HtXnl+IhOgY3PVxcyPNMDt5+ZVULLgPIZea21h4wbq3IQnD4jVAxhQCqNYy 4qRtuJflng6qHJ7KToOAHlunxnJmlyvKGdyZtzK9XiG4QIKCwE+NKzwaQNRe8i2Qq8p1 CTM/eYgff4vr76U9yzxtlRJ00fxDpQrcAU41/1Fa/8vJdpjpwL02ON5VqWyfpj7jZ4XK i7og== X-Gm-Message-State: AA6/9Rk4QEaiuCOPlT1sW5JphyDcsq0XDVOGYdZ7559/lw1gs/K89p8DGwBYzYQHHsF9NVuMaXS8jcv9683Lblax 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-stable] [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: 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: 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 > >