From: Oleg Nesterov Date: Mon, 17 Nov 2008 14:39:47 +0000 (+0100) Subject: sched, signals: fix the racy usage of ->signal in account_group_xxx/run_posix_cpu_timers X-Git-Tag: v2.6.28-rc6~54^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ad133ba3dc283300e5b62b5b7211d2f39fbf6ee7;p=pandora-kernel.git sched, signals: fix the racy usage of ->signal in account_group_xxx/run_posix_cpu_timers Impact: fix potential NULL dereference Contrary to ad474caca3e2a0550b7ce0706527ad5ab389a4d4 changelog, other acct_group_xxx() helpers can be called after exit_notify() by timer tick. Thanks to Roland for pointing out this. Somehow I missed this simple fact when I read the original patch, and I am afraid I confused Frank during the discussion. Sorry. Fortunately, these helpers work with current, we can check ->exit_state to ensure that ->signal can't go away under us. Also, add the comment and compiler barrier to account_group_exec_runtime(), to make sure we load ->signal only once. Signed-off-by: Oleg Nesterov Signed-off-by: Ingo Molnar --- Reading git-diff-tree failed