]> git.baikalelectronics.ru Git - kernel.git/commit
Fix breakage in MIPS siginfo handling
authorDavid Howells <dhowells@redhat.com>
Tue, 19 Mar 2013 14:00:53 +0000 (14:00 +0000)
committerRalf Baechle <ralf@linux-mips.org>
Tue, 19 Mar 2013 18:15:52 +0000 (19:15 +0100)
commit026a5a9f49e5006295592dd357d03c731046770b
treedaaac9cc2b216519c2c456450344b7e5c66c01de
parent4b2b873340b75594559e3569f5d96a4b224579df
Fix breakage in MIPS siginfo handling

MIPS's siginfo handling has been broken since this commit:

commit 9f137a64f3261391968752f3fb9ef0c79e5eccb9
Author: Al Viro <viro@zeniv.linux.org.uk>
Date:   Sun Nov 25 22:24:19 2012 -0500
consolidate kernel-side struct sigaction declarations

for 64-bit BE MIPS CPUs.

The UAPI variant looks like this:

struct sigaction {
unsigned int sa_flags;
__sighandler_t sa_handler;
sigset_t sa_mask;
};

but the core kernel's variant looks like this:

struct sigaction {
#ifndef __ARCH_HAS_ODD_SIGACTION
__sighandler_t sa_handler;
unsigned long sa_flags;
#else
unsigned long sa_flags;
__sighandler_t sa_handler;
#endif
#ifdef __ARCH_HAS_SA_RESTORER
__sigrestore_t sa_restorer;
#endif
sigset_t sa_mask;
};

The problem is that sa_flags has been changed from an unsigned int to an
unsigned long.

Fix this by making sa_flags unsigned int if __ARCH_HAS_ODD_SIGACTION is
defined.

Whilst we're at it, rename __ARCH_HAS_ODD_SIGACTION to
__ARCH_HAS_IRIX_SIGACTION.

Signed-off-by: David Howells <dhowells@redhat.com>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Cc: stable@vger.kernel.org
Acked-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/include/asm/signal.h
include/linux/compat.h
include/linux/signal.h