From: Stanislaw Gruszka Date: Thu, 11 Mar 2010 22:04:42 +0000 (-0800) Subject: cpu-timers: Avoid iterating over all threads in fastpath_timer_check() X-Git-Tag: v2.6.35-rc1~492^2~15 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c28739375bf0d6e239b4fa939ec8372aa2c707d2;p=pandora-kernel.git cpu-timers: Avoid iterating over all threads in fastpath_timer_check() Spread p->sighand->siglock locking scope to make sure that fastpath_timer_check() never iterates over all threads. Without locking there is small possibility that signal->cputimer will stop running while we write values to signal->cputime_expires. Calling thread_group_cputime() from fastpath_timer_check() is not only bad because it is slow, also it is racy with __exit_signal() which can lead to invalid signal->{s,u}time values. Signed-off-by: Stanislaw Gruszka Cc: Ingo Molnar Cc: Oleg Nesterov Cc: Peter Zijlstra Cc: Hidetoshi Seto Cc: Balbir Singh Signed-off-by: Andrew Morton Signed-off-by: Thomas Gleixner --- Reading git-diff-tree failed