Files
Linux/kernel/time
Thomas Gleixner 10632008b9 clockevents: Prevent shift out of bounds
Andrey reported that on a kernel with UBSan enabled he found:

     UBSan: Undefined behaviour in ../kernel/time/clockevents.c:75:34

     I guess it should be 1ULL here instead of 1U:
            (!ismax || evt->mult <= (1U << evt->shift)))

That's indeed the correct solution because shift might be 32.

Reported-by: Andrey Ryabinin <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
2014-10-25 10:43:15 +02:00
..