Re: [PATCH] sched: fix never executed code due to expression always false

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jesper Juhl wrote:
There are two expressions in kernel/sched.c that are always false since they test for <0 but the result of the expression is unsigned so they will never be less than zero. This patch implement the logic that I believe is intended without the signedness issue and without the nasty casts.
<disclaimer>patch is compile tested only</disclaimer>


This is not *quite* the intended behaviour. It is OK for prev->timestamp
to be '0 - a bit' and now to be '0 + a bit' in the case of wrapping.

Although considering they're 64-bit values, I'm not sure how much we care.

--
SUSE Labs, Novell Inc.

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

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux