diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2020-04-17 08:12:22 +0200 |
---|---|---|
committer | Thomas Zimmermann <tzimmermann@suse.de> | 2020-04-17 08:12:22 +0200 |
commit | 08d99b2c23dfa84ca5b5e5c194062a0550888b71 (patch) | |
tree | f4cf81ba52b375bbafd3b7ee2603b3a4cae7fe30 /include/linux/sched/signal.h | |
parent | 13e3d94110d82e318d640d0980896d32e02ba4d6 (diff) | |
parent | 8f3d9f354286745c751374f5f1fcafee6b3f3136 (diff) | |
download | lwn-08d99b2c23dfa84ca5b5e5c194062a0550888b71.tar.gz lwn-08d99b2c23dfa84ca5b5e5c194062a0550888b71.zip |
Merge drm/drm-next into drm-misc-next
Backmerging required to pull topic/phy-compliance.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Diffstat (limited to 'include/linux/sched/signal.h')
-rw-r--r-- | include/linux/sched/signal.h | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/include/linux/sched/signal.h b/include/linux/sched/signal.h index 88050259c466..3e5b090c16d4 100644 --- a/include/linux/sched/signal.h +++ b/include/linux/sched/signal.h @@ -10,6 +10,8 @@ #include <linux/cred.h> #include <linux/refcount.h> #include <linux/posix-timers.h> +#include <linux/mm_types.h> +#include <asm/ptrace.h> /* * Types defining task->signal and task->sighand and APIs using them: @@ -224,7 +226,14 @@ struct signal_struct { struct mutex cred_guard_mutex; /* guard against foreign influences on * credential calculations - * (notably. ptrace) */ + * (notably. ptrace) + * Deprecated do not use in new code. + * Use exec_update_mutex instead. + */ + struct mutex exec_update_mutex; /* Held while task_struct is being + * updated during exec, and may have + * inconsistent permissions. + */ } __randomize_layout; /* @@ -370,6 +379,20 @@ static inline int signal_pending_state(long state, struct task_struct *p) } /* + * This should only be used in fault handlers to decide whether we + * should stop the current fault routine to handle the signals + * instead, especially with the case where we've got interrupted with + * a VM_FAULT_RETRY. + */ +static inline bool fault_signal_pending(vm_fault_t fault_flags, + struct pt_regs *regs) +{ + return unlikely((fault_flags & VM_FAULT_RETRY) && + (fatal_signal_pending(current) || + (user_mode(regs) && signal_pending(current)))); +} + +/* * Reevaluate whether the task has signals pending delivery. * Wake the task if so. * This is required every time the blocked sigset_t changes. |