Hiroshi Shimamoto 9c95e7319b sched: fix invalid sched_class use
When using rt_mutex, a NULL pointer dereference is occurred at
enqueue_task_rt. Here is a scenario;
1) there are two threads, the thread A is fair_sched_class and
   thread B is rt_sched_class.
2) Thread A is boosted up to rt_sched_class, because the thread A
   has a rt_mutex lock and the thread B is waiting the lock.
3) At this time, when thread A create a new thread C, the thread
   C has a rt_sched_class.
4) When doing wake_up_new_task() for the thread C, the priority
   of the thread C is out of the RT priority range, because the
   normal priority of thread A is not the RT priority. It makes
   data corruption by overflowing the rt_prio_array.
The new thread C should be fair_sched_class.

The new thread should be valid scheduler class before queuing.
This patch fixes to set the suitable scheduler class.

Signed-off-by: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
2007-09-19 23:34:46 +02:00
..
2007-08-31 01:42:23 -07:00
2007-07-16 09:05:47 -07:00
2007-08-22 19:52:44 -07:00
2007-07-18 08:47:40 -07:00
2006-12-07 08:39:36 -08:00
2007-07-16 09:05:50 -07:00
2007-08-11 15:47:42 -07:00
2007-07-20 12:01:34 -07:00
2006-12-04 02:00:22 -05:00
2007-07-31 15:39:40 -07:00
2007-07-16 09:05:47 -07:00
2007-07-19 10:04:49 -07:00
2007-08-22 19:52:46 -07:00
2007-08-11 15:47:42 -07:00
2007-07-16 09:05:49 -07:00
2007-07-16 09:05:49 -07:00
2007-07-16 09:05:49 -07:00
2007-09-19 23:34:46 +02:00
2007-07-16 09:05:50 -07:00
2007-09-19 11:24:18 -07:00
2007-05-09 08:57:56 +02:00
2007-08-27 10:27:48 -07:00