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.

Merge branch 'timers-for-linus-urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'timers-for-linus-urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
hrtimer: Preserve timer state in remove_hrtimer()

+11 -2
+11 -2
kernel/hrtimer.c
··· 931 931 remove_hrtimer(struct hrtimer *timer, struct hrtimer_clock_base *base) 932 932 { 933 933 if (hrtimer_is_queued(timer)) { 934 + unsigned long state; 934 935 int reprogram; 935 936 936 937 /* ··· 945 944 debug_deactivate(timer); 946 945 timer_stats_hrtimer_clear_start_info(timer); 947 946 reprogram = base->cpu_base == &__get_cpu_var(hrtimer_bases); 948 - __remove_hrtimer(timer, base, HRTIMER_STATE_INACTIVE, 949 - reprogram); 947 + /* 948 + * We must preserve the CALLBACK state flag here, 949 + * otherwise we could move the timer base in 950 + * switch_hrtimer_base. 951 + */ 952 + state = timer->state & HRTIMER_STATE_CALLBACK; 953 + __remove_hrtimer(timer, base, state, reprogram); 950 954 return 1; 951 955 } 952 956 return 0; ··· 1237 1231 BUG_ON(timer->state != HRTIMER_STATE_CALLBACK); 1238 1232 enqueue_hrtimer(timer, base); 1239 1233 } 1234 + 1235 + WARN_ON_ONCE(!(timer->state & HRTIMER_STATE_CALLBACK)); 1236 + 1240 1237 timer->state &= ~HRTIMER_STATE_CALLBACK; 1241 1238 } 1242 1239