Jetpack/kernel_avc/kernel-4.9/rt-patches/0089-signal-Make-__lock_tas...

45 lines
1.3 KiB
Diff

From 60b91d4b89f1ea0abfbb5c0f3756a06bae105936 Mon Sep 17 00:00:00 2001
From: Thomas Gleixner <tglx@linutronix.de>
Date: Fri, 22 Jul 2011 08:07:08 +0200
Subject: [PATCH 089/352] signal: Make __lock_task_sighand() RT aware
local_irq_save() + spin_lock(&sighand->siglock) does not work on
-RT. Use the nort variants.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
kernel/signal.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/kernel/signal.c b/kernel/signal.c
index f5465ea..3e46462 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -1286,12 +1286,12 @@ struct sighand_struct *__lock_task_sighand(struct task_struct *tsk,
* Disable interrupts early to avoid deadlocks.
* See rcu_read_unlock() comment header for details.
*/
- local_irq_save(*flags);
+ local_irq_save_nort(*flags);
rcu_read_lock();
sighand = rcu_dereference(tsk->sighand);
if (unlikely(sighand == NULL)) {
rcu_read_unlock();
- local_irq_restore(*flags);
+ local_irq_restore_nort(*flags);
break;
}
/*
@@ -1312,7 +1312,7 @@ struct sighand_struct *__lock_task_sighand(struct task_struct *tsk,
}
spin_unlock(&sighand->siglock);
rcu_read_unlock();
- local_irq_restore(*flags);
+ local_irq_restore_nort(*flags);
}
return sighand;
--
2.7.4