patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Ajit Khaparde <ajit.khaparde@broadcom.com>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: dev@dpdk.org, dpdk stable <stable@dpdk.org>
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
Date: Mon, 10 Oct 2016 13:41:49 -0500	[thread overview]
Message-ID: <CACZ4nhsqGARFyHzV+aSCxEtXM8O2P_hRJox1rqiNxDfDRc-ugg@mail.gmail.com> (raw)
In-Reply-To: <1475170776-10130-5-git-send-email-linville@tuxdriver.com>

On Thu, Sep 29, 2016 at 12:39 PM, John W. Linville <linville@tuxdriver.com>
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 <linville@tuxdriver.com>
>
​Acked
-by: Ajit Khaparde <ajit.khaparde@broadcom.com>


> ---
> 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_ethdev
> .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_dev
> *eth_dev,
>          * remove the corresponding MAC addr filter
>          */
>         for (i = 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
>
>

  reply	other threads:[~2016-10-10 18:42 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1475090404-20707-1-git-send-email-linville@tuxdriver.com>
     [not found] ` <1475090404-20707-4-git-send-email-linville@tuxdriver.com>
2016-09-29  8:15   ` [dpdk-stable] [dpdk-dev] [PATCH 3/4] i40e_vsi_release: do not use vsi until after NULL check Ferruh Yigit
2016-09-29 17:39 ` [dpdk-stable] [PATCH v2 0/4] random fixes for bugs identified by Coverity John W. Linville
2016-09-29 17:39   ` [dpdk-stable] [PATCH v2 1/4] net/ena: improve safety of string handling in ena_config_host_info John W. Linville
2016-10-12 16:24     ` Ferruh Yigit
2016-09-29 17:39   ` [dpdk-stable] [PATCH v2 2/4] net/bnxt: ensure entry_length is unsigned in bnxt_alloc_vnic_attributes John W. Linville
2016-09-29 19:06     ` [dpdk-stable] [dpdk-dev] " Ajit Khaparde
2016-09-29 17:39   ` [dpdk-stable] [PATCH v2 3/4] net/i40e: do not use vsi until after NULL check in i40e_vsi_release John W. Linville
2016-09-29 17:39   ` [dpdk-stable] [PATCH v2 4/4] net/bnxt: add ULL suffix to constant 1 for bit shift in bnxt_mac_addr_remove_op John W. Linville
2016-10-10 18:41     ` Ajit Khaparde [this message]
2016-10-13  9:31   ` [dpdk-stable] [dpdk-dev] [PATCH v2 0/4] random fixes for bugs identified by Coverity Bruce Richardson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CACZ4nhsqGARFyHzV+aSCxEtXM8O2P_hRJox1rqiNxDfDRc-ugg@mail.gmail.com \
    --to=ajit.khaparde@broadcom.com \
    --cc=dev@dpdk.org \
    --cc=linville@tuxdriver.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).