mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-08 05:43:28 -04:00
parisc/signal: Add FPE_CONDTRAP for conditional trap handling
Posix and common sense requires that SI_USER not be a signal specific si_code. Thus add a new FPE_CONDTRAP si_code for conditional traps. Signed-off-by: Helge Deller <deller@gmx.de> Cc: Stephen Rothwell <sfr@canb.auug.org.au>
This commit is contained in:
@@ -8,11 +8,4 @@
|
||||
|
||||
#include <asm-generic/siginfo.h>
|
||||
|
||||
/*
|
||||
* SIGFPE si_codes
|
||||
*/
|
||||
#ifdef __KERNEL__
|
||||
#define FPE_FIXME 0 /* Broken dup of SI_USER */
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif
|
||||
|
||||
@@ -627,9 +627,10 @@ void notrace handle_interruption(int code, struct pt_regs *regs)
|
||||
on condition */
|
||||
if(user_mode(regs)){
|
||||
si.si_signo = SIGFPE;
|
||||
/* Set to zero, and let the userspace app figure it out from
|
||||
the insn pointed to by si_addr */
|
||||
si.si_code = FPE_FIXME;
|
||||
/* Let userspace app figure it out from the insn pointed
|
||||
* to by si_addr.
|
||||
*/
|
||||
si.si_code = FPE_CONDTRAP;
|
||||
si.si_addr = (void __user *) regs->iaoq[0];
|
||||
force_sig_info(SIGFPE, &si, current);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user