diff options
author | Petr Malat <oss@malat.biz> | 2014-12-12 15:28:01 +0100 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2015-02-19 13:47:46 +0100 |
commit | 8cb48fe169dd682b6c29a3b7ef18333e4f577890 (patch) | |
tree | 66b586be917aeb42bf14fc6423f7412afbcfdb5d /arch/mips/include/uapi/asm | |
parent | 32098ec7bcba492f28451d2701ca4e26f2cc1c6e (diff) |
MIPS: Provide correct siginfo_t.si_stime
Provide correct siginfo_t.si_stime on MIPS64
Bug description:
MIPS version of copy_siginfo() is not aware of alignment on platforms with
64-bit long integers, which leads to an incorrect si_stime passed to signal
handlers, because the last element (si_stime) of _sifields._sigchld is not
copied. If _MIPS_SZLONG is 64, then the _sifields starts at the offset of
4 * sizeof(int).
Patch description:
Use the generic copy_siginfo, which doesn't have this problem.
Signed-off-by: Petr Malat <oss@malat.biz>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/8671/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/include/uapi/asm')
-rw-r--r-- | arch/mips/include/uapi/asm/siginfo.h | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/arch/mips/include/uapi/asm/siginfo.h b/arch/mips/include/uapi/asm/siginfo.h index d08f83f19db5..2cb7fdead570 100644 --- a/arch/mips/include/uapi/asm/siginfo.h +++ b/arch/mips/include/uapi/asm/siginfo.h @@ -16,13 +16,6 @@ #define HAVE_ARCH_SIGINFO_T /* - * We duplicate the generic versions - <asm-generic/siginfo.h> is just borked - * by design ... - */ -#define HAVE_ARCH_COPY_SIGINFO -struct siginfo; - -/* * Careful to keep union _sifields from shifting ... */ #if _MIPS_SZLONG == 32 @@ -35,8 +28,9 @@ struct siginfo; #define __ARCH_SIGSYS -#include <asm-generic/siginfo.h> +#include <uapi/asm-generic/siginfo.h> +/* We can't use generic siginfo_t, because our si_code and si_errno are swapped */ typedef struct siginfo { int si_signo; int si_code; @@ -124,5 +118,6 @@ typedef struct siginfo { #define SI_TIMER __SI_CODE(__SI_TIMER, -3) /* sent by timer expiration */ #define SI_MESGQ __SI_CODE(__SI_MESGQ, -4) /* sent by real time mesq state change */ +#include <asm-generic/siginfo.h> #endif /* _UAPI_ASM_SIGINFO_H */ |