Oleg Nesterov
dae51f5620
sched: fix SCHED_FIFO tasks & FAIR_GROUP_SCHED
...
Suppose that the SCHED_FIFO task does
switch_uid(new_user);
Now, p->se.cfs_rq and p->se.parent both point into the old
user_struct->tg because sched_move_task() doesn't call set_task_cfs_rq()
for !fair_sched_class case.
Suppose that old user_struct/task_group is freed/reused, and the task
does
sched_setscheduler(SCHED_NORMAL);
__setscheduler() sets fair_sched_class, but doesn't update
->se.cfs_rq/parent which point to the freed memory.
This means that check_preempt_wakeup() doing
while (!is_same_group(se, pse)) {
se = parent_entity(se);
pse = parent_entity(pse);
}
may OOPS in a similar way if rq->curr or p did something like above.
Perhaps we need something like the patch below, note that
__setscheduler() can't do set_task_cfs_rq().
Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru >
Signed-off-by: Ingo Molnar <mingo@elte.hu >
2007-11-15 20:57:40 +01:00
..
2007-11-14 18:45:43 -08:00
2007-11-14 18:45:43 -08:00
2007-11-05 15:12:33 -08:00
2007-10-18 14:37:24 -07:00
2007-10-21 02:37:45 -04:00
2007-10-21 02:37:45 -04:00
2007-10-21 02:37:45 -04:00
2007-10-21 02:37:45 -04:00
2007-10-22 19:40:02 -07:00
2007-10-19 11:53:41 -07:00
2007-10-19 11:53:36 -07:00
2007-11-14 18:45:37 -08:00
2007-10-18 15:12:41 -07:00
2007-05-09 12:30:49 -07:00
2007-10-19 11:53:44 -07:00
2007-10-19 11:53:44 -07:00
2007-10-18 14:37:28 -07:00
2007-10-18 14:37:24 -07:00
2007-10-18 14:37:26 -07:00
2007-10-19 11:53:56 -07:00
2007-11-09 22:39:39 +01:00
2007-11-09 16:13:08 -08:00
2007-11-05 21:53:46 +11:00
2007-10-29 09:39:38 +01:00
2007-10-18 14:37:26 -07:00
2007-07-17 10:23:03 -07:00
2006-12-07 08:39:36 -08:00
2007-10-19 11:53:54 -07:00
2007-10-17 08:42:55 -07:00
2007-10-19 11:53:49 -07:00
2007-07-16 09:05:50 -07:00
2007-09-11 17:21:20 -07:00
2007-10-16 09:43:10 -07:00
2007-10-17 08:42:54 -07:00
2007-07-31 15:39:42 -07:00
2006-12-04 02:00:22 -05:00
2006-12-07 08:39:43 -08:00
2007-10-11 22:11:11 +02:00
2007-10-28 20:47:01 +01:00
2007-11-14 18:45:40 -08:00
2007-11-14 18:45:40 -08:00
2007-10-19 11:53:54 -07:00
2007-02-14 08:09:54 -08:00
2006-07-03 15:27:01 -07:00
2007-10-11 22:11:12 +02:00
2006-07-03 15:27:04 -07:00
2007-10-19 11:53:34 -07:00
2007-10-19 11:53:37 -07:00
2007-10-19 11:53:39 -07:00
2007-10-20 00:30:06 +02:00
2007-11-14 18:45:42 -08:00
2007-11-14 18:45:43 -08:00
2007-10-19 11:53:40 -07:00
2007-10-19 11:53:40 -07:00
2007-10-18 14:37:19 -07:00
2007-10-24 18:23:50 +02:00
2007-10-19 11:53:40 -07:00
2007-10-17 08:42:48 -07:00
2007-10-17 08:42:53 -07:00
2007-10-18 14:37:24 -07:00
2007-11-14 18:45:39 -08:00
2007-07-16 09:05:49 -07:00
2007-10-19 11:53:43 -07:00
2006-07-03 15:27:01 -07:00
2007-07-17 10:23:02 -07:00
2007-10-19 11:53:43 -07:00
2006-07-03 15:27:01 -07:00
2007-07-19 10:04:49 -07:00
2007-11-09 22:39:37 +01:00
2007-11-09 22:39:39 +01:00
2007-10-24 18:23:51 +02:00
2007-10-24 18:23:51 +02:00
2007-11-09 22:39:37 +01:00
2007-11-15 20:57:40 +01:00
2007-07-16 09:05:50 -07:00
2007-11-12 16:05:23 -08:00
2007-10-10 16:49:18 -07:00
2007-10-19 11:53:43 -07:00
2007-07-19 10:04:49 -07:00
2006-10-04 07:55:30 -07:00
2006-07-03 15:27:02 -07:00
2007-07-16 09:05:41 -07:00
2007-10-30 21:29:56 -07:00
2007-10-19 11:53:43 -07:00
2007-11-13 21:15:24 -08:00
2007-11-14 18:45:37 -08:00
2007-11-14 18:45:44 -08:00
2007-10-18 14:37:24 -07:00
2007-11-09 22:39:38 +01:00
2007-10-18 14:37:28 -07:00
2007-05-08 11:15:07 -07:00
2007-09-19 11:24:18 -07:00
2007-10-24 18:23:50 +02:00
2007-07-16 09:05:47 -07:00
2007-09-19 11:24:17 -07:00
2007-05-09 08:57:56 +02:00
2007-10-19 11:53:43 -07:00