[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3079.1567173701@warthog.procyon.org.uk>
Date: Fri, 30 Aug 2019 15:01:41 +0100
From: David Howells <dhowells@...hat.com>
To: Colin King <colin.king@...onical.com>
Cc: dhowells@...hat.com, linux-afs@...ts.infradead.org,
kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] afs: use BIT_ULL for shifting to fix integer overflow
Colin King <colin.king@...onical.com> wrote:
> The expression 1 << nr_slots is evaluated with 32 bit integer arithmetic
> and can overflow before it is widened.
If it does, it's an error on the part of the caller. See the banner comment:
1 <= nr_slots <= 9.
And, in any case, if nr_slots >= 64, using BIT_ULL wouldn't help...
David
Powered by blists - more mailing lists