diff options
author | Oleg Nesterov <oleg@redhat.com> | 2015-06-04 16:22:16 -0400 |
---|---|---|
committer | Paul Moore <pmoore@redhat.com> | 2015-06-04 16:22:16 -0400 |
commit | 9e7c8f8c62c1e1cda203b5bfaba4575b141e42e7 (patch) | |
tree | ffbe4be8b34649fd07898137aeb74404f4fa093f /include/linux/sched.h | |
parent | cded3fffbeab777e6ad2ec05d4a3b62c5caca0f3 (diff) | |
download | blackbird-op-linux-9e7c8f8c62c1e1cda203b5bfaba4575b141e42e7.tar.gz blackbird-op-linux-9e7c8f8c62c1e1cda203b5bfaba4575b141e42e7.zip |
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 <oleg@redhat.com>
Signed-off-by: Paul Moore <pmoore@redhat.com>
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r-- | include/linux/sched.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 8222ae40ecb0..4f84aade8b4d 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -2373,7 +2373,6 @@ extern void sched_dead(struct task_struct *p); extern void proc_caches_init(void); extern void flush_signals(struct task_struct *); -extern void __flush_signals(struct task_struct *); extern void ignore_signals(struct task_struct *); extern void flush_signal_handlers(struct task_struct *, int force_default); extern int dequeue_signal(struct task_struct *tsk, sigset_t *mask, siginfo_t *info); |