]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
[PATCH] revert "Drop tasklist lock in do_sched_setscheduler"
authorOleg Nesterov <oleg@tv-sign.ru>
Sun, 27 Aug 2006 08:23:34 +0000 (01:23 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sun, 27 Aug 2006 18:01:29 +0000 (11:01 -0700)
commitf8986c241dfd54d51c9eff967129a550ae230144
tree62f9a9739a2119024ad7bef7c26498bd332904b5
parentcb3e0fe3a5dabdc5eda50b825acb23bdfa2d1d55
[PATCH] revert "Drop tasklist lock in do_sched_setscheduler"

sched_setscheduler() looks at ->signal->rlim[].  It is unsafe do
dereference ->signal unless tasklist_lock or ->siglock is held (or p ==
current).  We pin the task structure, but this can't prevent from
release_task()->__exit_signal() which sets ->signal = NULL.

Restore tasklist_lock across the setscheduler call.

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
kernel/sched.c