[PATCH 31/31] utrace_resume: check irqs_disabled() to shut up lockdep

Oleg Nesterov oleg at redhat.com
Wed Aug 3 19:10:46 UTC 2011


utrace_resume() enables irqs unconditionally. With the recent changes
in lockdep.c this triggers the warning. Check irqs_disabled() before
local_irq_enable().

Signed-off-by: Oleg Nesterov <oleg at redhat.com>
---
 kernel/utrace.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/kernel/utrace.c b/kernel/utrace.c
index 05e8532..c817a46 100644
--- a/kernel/utrace.c
+++ b/kernel/utrace.c
@@ -1881,7 +1881,8 @@ void utrace_resume(struct task_struct *task, struct pt_regs *regs)
 	 * code path leads to calling into get_signal_to_deliver(), which
 	 * implicitly reenables them by virtue of spin_unlock_irq.
 	 */
-	local_irq_enable();
+	if (irqs_disabled())	/* make trace_hardirqs_on() happy */
+		local_irq_enable();
 
 	/*
 	 * If this flag is still set it's because there was a signal
-- 
1.5.5.1




More information about the kernel mailing list