[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ec7abed3-1685-8ae0-1a89-d9fc4ee76275@embeddedor.com>
Date: Tue, 6 Apr 2021 05:13:38 -0500
From: "Gustavo A. R. Silva" <gustavo@...eddedor.com>
To: Jonathan Cameron <jic23@...nel.org>,
"Gustavo A. R. Silva" <gustavoars@...nel.org>
Cc: Lars-Peter Clausen <lars@...afoo.de>, linux-iio@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH][next] iio: hrtimer-trigger: Fix potential integer
overflow in iio_hrtimer_store_sampling_frequency
On 4/5/21 11:26, Jonathan Cameron wrote:
> On Mon, 29 Mar 2021 15:58:17 -0500
> "Gustavo A. R. Silva" <gustavoars@...nel.org> wrote:
>
>> Add suffix ULL to constant 1000 in order to avoid a potential integer
>> overflow and give the compiler complete information about the proper
>> arithmetic to use. Notice that this constant is being used in a context
>> that expects an expression of type unsigned long long, but it's
>> currently evaluated using 32-bit arithmetic.
>>
>> Addresses-Coverity-ID: 1503062 ("Unintentional integer overflow")
>> Fixes: dafcf4ed8392 ("iio: hrtimer: Allow sub Hz granularity")
>> Signed-off-by: Gustavo A. R. Silva <gustavoars@...nel.org>
>
> Thanks, Applied to the togreg branch of iio.git and pushed out as testing
> for 0-day to poke at it.
Awesome. :)
Thanks, Jonathan.
--
Gustavo
Powered by blists - more mailing lists