From: Frederic Weisbecker Date: Fri, 11 Oct 2013 15:41:11 +0000 (+0200) Subject: posix-timers: Use sighand lock instead of tasklist_lock for task clock sample X-Git-Tag: v3.14-rc1~169^2~4^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=50875788a1d4a3f662a27ed13cd05282d835939a;p=pandora-kernel.git posix-timers: Use sighand lock instead of tasklist_lock for task clock sample There is no need for the tasklist_lock just to take a process wide clock sample. All we need is to get a coherent sample that doesn't race with exit() and exec(): * exit() may be concurrently reaping a task and flushing its time * sighand is unstable under exit() and exec(), and the latter also result in group leader that can change To protect against these, locking the target's sighand is enough. Signed-off-by: Frederic Weisbecker Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Oleg Nesterov Cc: Kosaki Motohiro Cc: Andrew Morton --- Reading git-diff-tree failed