]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
sched: Don't use possibly stale sched_class
authorThomas Gleixner <tglx@linutronix.de>
Wed, 17 Feb 2010 08:05:48 +0000 (09:05 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 15 Mar 2010 15:50:17 +0000 (08:50 -0700)
commit04833a6a2dd0f236d1f5c17075a34df9df74351c
tree30696936339fcecd60011b8e281da78db19d9e98
parent76d071362505e9ea55210b4b5cb7a6824c4c0b22
sched: Don't use possibly stale sched_class

commit 83ab0aa0d5623d823444db82c3b3c34d7ec364ae upstream.

setscheduler() saves task->sched_class outside of the rq->lock held
region for a check after the setscheduler changes have become
effective. That might result in checking a stale value.

rtmutex_setprio() has the same problem, though it is protected by
p->pi_lock against setscheduler(), but for correctness sake (and to
avoid bad examples) it needs to be fixed as well.

Retrieve task->sched_class inside of the rq->lock held region.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
kernel/sched.c