From: Oleg Nesterov Date: Tue, 7 Oct 2014 19:51:08 +0000 (+0200) Subject: sched: Fix the PREEMPT_ACTIVE check in __trace_sched_switch_state() X-Git-Tag: omap-for-v3.19/fixes-rc1~165^2~48 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8f9fbf092cd0ae31722b42c9abb427a87d55c18a;p=pandora-kernel.git sched: Fix the PREEMPT_ACTIVE check in __trace_sched_switch_state() task_preempt_count() has nothing to do with the actual preempt counter, thread_info->saved_preempt_count is only valid right after switch_to(). __trace_sched_switch_state() can use preempt_count(), prev is still the current task when trace_sched_switch() is called. Signed-off-by: Oleg Nesterov [ Added BUG_ON(). ] Signed-off-by: Peter Zijlstra (Intel) Cc: Andrew Morton Cc: Andy Lutomirski Cc: Linus Torvalds Cc: Mel Gorman Cc: Oleg Nesterov Cc: Steven Rostedt Link: http://lkml.kernel.org/r/20141007195108.GB28002@redhat.com Signed-off-by: Ingo Molnar --- Reading git-diff-tree failed