From: David Miller <davem@davemloft.net>
To: colin.king@canonical.com
Cc: dchickles@marvell.com, sburla@marvell.com, fmanlunas@marvell.com,
netdev@vger.kernel.org, kernel-janitors@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH][V2] net: lio_core: fix potential sign-extension overflow on large shift
Date: Tue, 18 Jun 2019 21:01:25 -0400 (EDT) [thread overview]
Message-ID: <20190618.210125.383827657449306914.davem@davemloft.net> (raw)
In-Reply-To: <20190617161249.28846-1-colin.king@canonical.com>
From: Colin King <colin.king@canonical.com>
Date: Mon, 17 Jun 2019 17:12:49 +0100
> From: Colin Ian King <colin.king@canonical.com>
>
> Left shifting the signed int value 1 by 31 bits has undefined behaviour
> and the shift amount oq_no can be as much as 63. Fix this by using
> BIT_ULL(oq_no) instead.
>
> Addresses-Coverity: ("Bad shift operation")
> Fixes: f21fb3ed364b ("Add support of Cavium Liquidio ethernet adapters")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>
> V2: Use BIT_ULL(oq_no) instead of 1ULL << oq_no. Thanks to Dan Carpenter for
> noting this is more appropriate.
Applied.
prev parent reply other threads:[~2019-06-19 1:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-17 16:12 [PATCH][V2] net: lio_core: fix potential sign-extension overflow on large shift Colin King
2019-06-17 19:17 ` Dan Carpenter
2019-06-19 1:01 ` David Miller [this message]
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=20190618.210125.383827657449306914.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=colin.king@canonical.com \
--cc=dchickles@marvell.com \
--cc=fmanlunas@marvell.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=sburla@marvell.com \
/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).