lkml.org 
[lkml]   [2012]   [May]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 10/20] sh: Do not call do_signal() with irqs disabled
Date
get_signal_to_deliver() calls try_to_freeze() which might sleep.

Cc: Paul Mundt <lethal@linux-sh.org>
Cc: linux-sh@vger.kernel.org
Signed-off-by: Richard Weinberger <richard@nod.at>
---
arch/sh/kernel/signal_32.c | 3 +++
arch/sh/kernel/signal_64.c | 3 +++
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/arch/sh/kernel/signal_32.c b/arch/sh/kernel/signal_32.c
index cb4172c..4f1db5e 100644
--- a/arch/sh/kernel/signal_32.c
+++ b/arch/sh/kernel/signal_32.c
@@ -25,6 +25,7 @@
#include <linux/freezer.h>
#include <linux/io.h>
#include <linux/tracehook.h>
+#include <linux/irqflags.h>
#include <asm/ucontext.h>
#include <asm/uaccess.h>
#include <asm/pgtable.h>
@@ -619,6 +620,8 @@ static void do_signal(struct pt_regs *regs, unsigned int save_r0)
asmlinkage void do_notify_resume(struct pt_regs *regs, unsigned int save_r0,
unsigned long thread_info_flags)
{
+ local_irq_enable();
+
/* deal with pending signal delivery */
if (thread_info_flags & _TIF_SIGPENDING)
do_signal(regs, save_r0);
diff --git a/arch/sh/kernel/signal_64.c b/arch/sh/kernel/signal_64.c
index b589a35..f92fdb7 100644
--- a/arch/sh/kernel/signal_64.c
+++ b/arch/sh/kernel/signal_64.c
@@ -23,6 +23,7 @@
#include <linux/unistd.h>
#include <linux/stddef.h>
#include <linux/tracehook.h>
+#include <linux/irqflags.h>
#include <asm/ucontext.h>
#include <asm/uaccess.h>
#include <asm/pgtable.h>
@@ -679,6 +680,8 @@ handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka,

asmlinkage void do_notify_resume(struct pt_regs *regs, unsigned long thread_info_flags)
{
+ local_irq_enable();
+
if (thread_info_flags & _TIF_SIGPENDING)
do_signal(regs);

--
1.7.7.3


\
 
 \ /
  Last update: 2012-05-26 01:41    [W:0.230 / U:0.424 seconds]
©2003-2014 Jasper Spaans. Advertise on this site