lkml.org 
[lkml]   [2019]   [Jun]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH][next] RDMA/hns: fix potential integer overflow on left shift
Date
On Mon, Jun 24, 2019 at 10:46:08PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> There is a potential integer overflow when int i is left shifted
> as this is evaluated using 32 bit arithmetic but is being used in
> a context that expects an expression of type dma_addr_t. Fix this
> by casting integer i to dma_addr_t before shifting to avoid the
> overflow.
>
> Addresses-Coverity: ("Unintentional integer overflow")
> Fixes: 2ac0bc5e725e ("RDMA/hns: Add a group interfaces for optimizing buffers getting flow")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> drivers/infiniband/hw/hns/hns_roce_alloc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)

Applied to for-next, thanks

Jason

\
 
 \ /
  Last update: 2019-06-25 15:20    [W:0.182 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site