sched/fair: Fix integer underflow
(struct sg_lb_stats).idle_cpus is of type 'unsigned int'. (local->idle_cpus - busiest->idle_cpus) can underflow to UINT_MAX for instance, and max_t(long, 0, UINT_MAX) will output UINT_MAX. Use lsub_positive() instead of max_t(). Fixes: 16b0a7a1 ("sched/fair: Ensure tasks spreading in LLC during LB") cc: stable@vger.kernel.org Signed-off-by:Pierre Gondois <pierre.gondois@arm.com> Reviewed-by:
Vincent Guittot <vincent.guittot@linaro.org>
Loading
Please register or sign in to comment