Re: [PATCH v2] x86/cpu: replacing the open-coded shift with BIT(x)

From: Jason A. Donenfeld
Date: Tue Nov 01 2022 - 09:49:04 EST


On Tue, Nov 1, 2022 at 2:37 PM cuigaosheng <cuigaosheng1@xxxxxxxxxx> wrote:
> > 215 [ 0.953146][ T0] UBSAN: shift-out-of-bounds in mm/shmem.c:3749:18
> > 216 [ 0.953863][ T0] left shift of 1 by 31 places cannot be represented in type 'int'

Isn't this just an issue with `1 << 31` needing to be `1U << 31`?

Jason