Re: [PATCH] sched: Fix sched_policy < 0 comparison

From: Peter Zijlstra
Date: Tue Jun 03 2014 - 04:26:58 EST


On Mon, Jun 02, 2014 at 10:38:34PM +0200, Richard Weinberger wrote:
> attr.sched_policy is u32, therefore a comparison against < 0 is never true.
> Fix this by casting sched_policy to int.
>
> This issue was reported by coverity CID 1219934.
>
> Cc: Michael Kerrisk <mtk.manpages@xxxxxxxxx>
> Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
> Cc: Ingo Molnar <mingo@xxxxxxxxxx>
> Signed-off-by: Richard Weinberger <richard@xxxxxx>

Thanks!

Attachment: pgpzEAhXmxA4R.pgp
Description: PGP signature