From: Matt Fleming Date: Fri, 11 May 2012 00:58:03 +0000 (+1000) Subject: microblaze: don't reimplement force_sigsegv() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=de8f2ddd69fc817b66138b36d656a2973d6afd8a;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git microblaze: don't reimplement force_sigsegv() Instead of open coding the sequence from force_sigsegv() just call it. This also fixes a bug because we were modifying ka->sa.sa_handler (which is a copy of sighand->action[]), whereas the intention of the code was to modify sighand->action[] directly. As the original code was working with a copy it had no effect on signal delivery. Acked-by: Oleg Nesterov Acked-by: Michal Simek Signed-off-by: Matt Fleming Signed-off-by: Andrew Morton Signed-off-by: Al Viro --- diff --git a/arch/microblaze/kernel/signal.c b/arch/microblaze/kernel/signal.c index 59967116898..90de06da3f6 100644 --- a/arch/microblaze/kernel/signal.c +++ b/arch/microblaze/kernel/signal.c @@ -270,9 +270,7 @@ static void setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, return; give_sigsegv: - if (sig == SIGSEGV) - ka->sa.sa_handler = SIG_DFL; - force_sig(SIGSEGV, current); + force_sigsegv(sig, current); } /* Handle restarting system calls */