From: Oleg Nesterov Date: Thu, 4 Jun 2015 20:22:16 +0000 (-0400) Subject: signals: don't abuse __flush_signals() in selinux_bprm_committed_creds() X-Git-Tag: omap-for-v4.2/fixes-rc1^2~81^2~10 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9e7c8f8c62c1e1cda203b5bfaba4575b141e42e7;p=pandora-kernel.git signals: don't abuse __flush_signals() in selinux_bprm_committed_creds() selinux_bprm_committed_creds()->__flush_signals() is not right, we shouldn't clear TIF_SIGPENDING unconditionally. There can be other reasons for signal_pending(): freezing(), JOBCTL_PENDING_MASK, and potentially more. Also change this code to check fatal_signal_pending() rather than SIGNAL_GROUP_EXIT, it looks a bit better. Now we can kill __flush_signals() before it finds another buggy user. Note: this code looks racy, we can flush a signal which was sent after the task SID has been updated. Signed-off-by: Oleg Nesterov Signed-off-by: Paul Moore --- Reading git-diff-tree failed