Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

posix cpu timers: fix timer ordering

Pointed out by Oleg Nesterov, who has been walking over the code
forwards and backwards.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>

+4 -6
+4 -6
kernel/posix-cpu-timers.c
··· 576 576 listpos = head; 577 577 if (CPUCLOCK_WHICH(timer->it_clock) == CPUCLOCK_SCHED) { 578 578 list_for_each_entry(next, head, entry) { 579 - if (next->expires.sched > nt->expires.sched) { 580 - listpos = &next->entry; 579 + if (next->expires.sched > nt->expires.sched) 581 580 break; 582 - } 581 + listpos = &next->entry; 583 582 } 584 583 } else { 585 584 list_for_each_entry(next, head, entry) { 586 - if (cputime_gt(next->expires.cpu, nt->expires.cpu)) { 587 - listpos = &next->entry; 585 + if (cputime_gt(next->expires.cpu, nt->expires.cpu)) 588 586 break; 589 - } 587 + listpos = &next->entry; 590 588 } 591 589 } 592 590 list_add(&nt->entry, listpos);