]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
signal: Remove SEND_SIG_FORCED
authorEric W. Biederman <ebiederm@xmission.com>
Mon, 3 Sep 2018 08:39:04 +0000 (10:39 +0200)
committerEric W. Biederman <ebiederm@xmission.com>
Tue, 11 Sep 2018 19:19:48 +0000 (21:19 +0200)
There are no more users of SEND_SIG_FORCED so it may be safely removed.

Remove the definition of SEND_SIG_FORCED, it's use in is_si_special,
it's use in TP_STORE_SIGINFO, and it's use in __send_signal as without
any users the uses of SEND_SIG_FORCED are now unncessary.

This makes the code simpler, easier to understand and use.  Users of
signal sending functions now no longer need to ask themselves do I
need to use SEND_SIG_FORCED.

Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
include/linux/sched/signal.h
include/trace/events/signal.h
kernel/signal.c

index 9b6968cbde14b2c36fd7874523d535361d8fa796..9e07f352154961c200c67528d2ee336354838744 100644 (file)
@@ -477,7 +477,6 @@ static inline int kill_cad_pid(int sig, int priv)
 /* These can be the second arg to send_sig_info/send_group_sig_info.  */
 #define SEND_SIG_NOINFO ((struct siginfo *) 0)
 #define SEND_SIG_PRIV  ((struct siginfo *) 1)
-#define SEND_SIG_FORCED        ((struct siginfo *) 2)
 
 /*
  * True if we are on the alternate signal stack.
index 86582923d51c92852202dbb3f65dbedb7dbb29eb..3deeed50ffd0545e6d5147ccf07e06178fb12779 100644 (file)
@@ -11,8 +11,7 @@
 
 #define TP_STORE_SIGINFO(__entry, info)                                \
        do {                                                    \
-               if (info == SEND_SIG_NOINFO ||                  \
-                   info == SEND_SIG_FORCED) {                  \
+               if (info == SEND_SIG_NOINFO) {                  \
                        __entry->errno  = 0;                    \
                        __entry->code   = SI_USER;              \
                } else if (info == SEND_SIG_PRIV) {             \
index d7d1adf735f44eaae535591e4af571f5d8946758..ec136fda457acfc630e9acc1f280d517feecca49 100644 (file)
@@ -736,7 +736,7 @@ static void flush_sigqueue_mask(sigset_t *mask, struct sigpending *s)
 
 static inline int is_si_special(const struct siginfo *info)
 {
-       return info <= SEND_SIG_FORCED;
+       return info <= SEND_SIG_PRIV;
 }
 
 static inline bool si_fromuser(const struct siginfo *info)
@@ -1039,7 +1039,7 @@ static int __send_signal(int sig, struct siginfo *info, struct task_struct *t,
 
        result = TRACE_SIGNAL_IGNORED;
        if (!prepare_signal(sig, t,
-                       from_ancestor_ns || (info == SEND_SIG_PRIV) || (info == SEND_SIG_FORCED)))
+                       from_ancestor_ns || (info == SEND_SIG_PRIV)))
                goto ret;
 
        pending = (type != PIDTYPE_PID) ? &t->signal->shared_pending : &t->pending;
@@ -1057,8 +1057,7 @@ static int __send_signal(int sig, struct siginfo *info, struct task_struct *t,
         * Skip useless siginfo allocation for SIGKILL SIGSTOP,
         * and kernel threads.
         */
-       if ((info == SEND_SIG_FORCED) ||
-           sig_kernel_only(sig) || (t->flags & PF_KTHREAD))
+       if (sig_kernel_only(sig) || (t->flags & PF_KTHREAD))
                goto out_set;
 
        /*