sched: Add debug check to task_of()
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Fri, 24 Jul 2009 10:25:30 +0000 (12:25 +0200)
committerIngo Molnar <mingo@elte.hu>
Sun, 2 Aug 2009 12:26:14 +0000 (14:26 +0200)
A frequent mistake appears to be to call task_of() on a
scheduler entity that is not actually a task, which can result
in a wild pointer.

Add a check to catch these mistakes.

Suggested-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/sched_fair.c
kernel/sched_rt.c

Simple merge
Simple merge