Re: [PATCH v2] sched/fair: fix mul overflow on 32-bit systems

From: Peter Zijlstra
Date: Mon Dec 14 2015 - 09:36:04 EST


On Mon, Dec 14, 2015 at 03:47:23PM +0300, Andrey Ryabinin wrote:
> Make 'r' 64-bit type to avoid overflow in 'r * LOAD_AVG_MAX'
> on 32-bit systems:
> UBSAN: Undefined behaviour in kernel/sched/fair.c:2785:18
> signed integer overflow:
> 87950 * 47742 cannot be represented in type 'int'
>
> Fixes: 9d89c257dfb9 ("sched/fair: Rewrite runnable load and utilization average tracking")
> Signed-off-by: Andrey Ryabinin <aryabinin@xxxxxxxxxxxxx>

Thanks!
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/