Fix: signal: Remove SEND_SIG_FORCED (v4.20)
authorMichael Jeanson <mjeanson@efficios.com>
Mon, 5 Nov 2018 16:35:53 +0000 (11:35 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 5 Nov 2018 16:39:44 +0000 (11:39 -0500)
See upstream commit :

  commit 4ff4c31a6e85f4c49fbeebeaa28018d002884b5a
  Author: Eric W. Biederman <ebiederm@xmission.com>
  Date:   Mon Sep 3 10:39:04 2018 +0200

    signal: Remove SEND_SIG_FORCED

    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.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
instrumentation/events/lttng-module/signal.h

index 6c484ba2f50064fefde47c824a6c3f6bb2151187..7e9631d3f5b36200b02d3f6e01f5317b2ebd5acf 100644 (file)
 #include <linux/signal.h>
 #include <linux/sched.h>
 #undef LTTNG_FIELDS_SIGINFO
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,20,0))
+#define LTTNG_FIELDS_SIGINFO(info)                             \
+               ctf_integer(int, errno,                         \
+                       (info == SEND_SIG_NOINFO || info == SEND_SIG_PRIV) ? \
+                       0 :                                     \
+                       info->si_errno)                         \
+               ctf_integer(int, code,                          \
+                       (info == SEND_SIG_NOINFO) ?             \
+                       SI_USER :                               \
+                       ((info == SEND_SIG_PRIV) ? SI_KERNEL : info->si_code))
+#else /* LINUX_VERSION_CODE >= KERNEL_VERSION(4,20,0) */
 #define LTTNG_FIELDS_SIGINFO(info)                             \
                ctf_integer(int, errno,                         \
                        (info == SEND_SIG_NOINFO || info == SEND_SIG_FORCED || info == SEND_SIG_PRIV) ? \
@@ -22,6 +33,7 @@
                        (info == SEND_SIG_NOINFO || info == SEND_SIG_FORCED) ? \
                        SI_USER :                               \
                        ((info == SEND_SIG_PRIV) ? SI_KERNEL : info->si_code))
+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(4,20,0) */
 #endif /* _TRACE_SIGNAL_DEF */
 
 /**
This page took 0.026167 seconds and 4 git commands to generate.