]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
signal/nds32: Use force_sig(SIGILL) in do_revisn
authorEric W. Biederman <ebiederm@xmission.com>
Tue, 17 Apr 2018 20:23:48 +0000 (15:23 -0500)
committerEric W. Biederman <ebiederm@xmission.com>
Wed, 25 Apr 2018 15:40:33 +0000 (10:40 -0500)
As originally committed do_revisn would deliver a siginfo for SIGILL
with an si_code composed of random stack contents.  That makes no
sense and is not something userspace can depend on.  So simplify
the code and just use "force_sig(SIG_ILL, current)" instead.

Fixes: 2923f5ea7738 ("nds32: Exception handling")
Cc: Vincent Chen <vincentc@andestech.com>
Cc: Greentime Hu <greentime@andestech.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
arch/nds32/kernel/traps.c

index 65961bf91d64972d75c5dbd74ccc5e5d9fe938bc..8e9a5b1f6234dc6ae03367e56716e52b741e9329 100644 (file)
@@ -356,14 +356,11 @@ void do_dispatch_tlb_misc(unsigned long entry, unsigned long addr,
 
 void do_revinsn(struct pt_regs *regs)
 {
-       siginfo_t si;
        pr_emerg("Reserved Instruction\n");
        show_regs(regs);
        if (!user_mode(regs))
                do_exit(SIGILL);
-       si.si_signo = SIGILL;
-       si.si_errno = 0;
-       force_sig_info(SIGILL, &si, current);
+       force_sig(SIGILL, current);
 }
 
 #ifdef CONFIG_ALIGNMENT_TRAP