[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20180131.103315.923448806673096482.davem@davemloft.net>
Date: Wed, 31 Jan 2018 10:33:15 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: gustavo@...eddedor.com
Cc: pshelar@....org, netdev@...r.kernel.org, dev@...nvswitch.org,
linux-kernel@...r.kernel.org, garsilva@...eddedor.com
Subject: Re: [PATCH] openvswitch: meter: Use 64-bit arithmetic instead of
32-bit
From: "Gustavo A. R. Silva" <gustavo@...eddedor.com>
Date: Tue, 30 Jan 2018 22:55:33 -0600
> Add suffix LL to constant 1000 in order to give the compiler
> complete information about the proper arithmetic to use. Notice
> that this constant is used in a context that expects an expression
> of type long long int (64 bits, signed).
>
> The expression (band->burst_size + band->rate) * 1000 is currently
> being evaluated using 32-bit arithmetic.
>
> Addresses-Coverity-ID: 1461563 ("Unintentional integer overflow")
> Signed-off-by: Gustavo A. R. Silva <gustavo@...eddedor.com>
Applied.
Powered by blists - more mailing lists