Index: linux-2.6.12-rc5-uiddep/kernel/sched.c =================================================================== --- linux-2.6.12-rc5-uiddep.orig/kernel/sched.c 2005-05-29 19:54:30.000000000 +1000 +++ linux-2.6.12-rc5-uiddep/kernel/sched.c 2005-06-01 21:46:54.000000000 +1000 @@ -2530,6 +2530,21 @@ static inline int dependent_sleeper(int task_t *smt_curr = smt_rq->curr; /* + * Don't let tasks from different users run on siblings that + * share caches to avoid the security risk of cache misses. + * If an equal priority task is already running let that one + * continue, otherwise let only the better priority task run. + */ + if (p->uid != smt_curr->uid && p->mm && smt_curr->mm) { + if (smt_curr->prio <= p->prio) { + ret = 1; + continue; + } + resched_task(smt_curr); + continue; + } + + /* * If a user task with lower static priority than the * running task on the SMT sibling is trying to schedule, * delay it till there is proportionately less timeslice