From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH] openvswitch: meter: Use 64-bit arithmetic instead of 32-bit Date: Wed, 31 Jan 2018 10:33:15 -0500 (EST) Message-ID: <20180131.103315.923448806673096482.davem@davemloft.net> References: <20180131045533.GA15485@embeddedgus> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: dev-yBygre7rU0TnMu66kgdUjQ@public.gmane.org, netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, garsilva-L1vi/lXTdts+Va1GwOuvDg@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: gustavo-L1vi/lXTdts+Va1GwOuvDg@public.gmane.org Return-path: In-Reply-To: <20180131045533.GA15485@embeddedgus> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: ovs-dev-bounces-yBygre7rU0TnMu66kgdUjQ@public.gmane.org Errors-To: ovs-dev-bounces-yBygre7rU0TnMu66kgdUjQ@public.gmane.org List-Id: netdev.vger.kernel.org From: "Gustavo A. R. Silva" 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 Applied.