Thread (2 messages) flat view 2 messages, 2 authors, 2011-03-17
STALE5628d

[patch] genirq: incorrect unlock in __setup_irq()

From: Dan Carpenter <hidden>
Date: 2011-03-17 11:43:41
Also in: lkml
Subsystem: irq subsystem, the rest · Maintainers: Thomas Gleixner, Linus Torvalds

goto out_thread is called before we take the lock.  It causes a gcc
warning: "kernel/irq/manage.c:858: warning: ‘flags’ may be used
uninitialized in this function"

Signed-off-by: Dan Carpenter <redacted>
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index acd599a..cdcdf13 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -1065,9 +1065,9 @@ mismatch:
 
 out_mask:
 	free_cpumask_var(mask);
+	raw_spin_unlock_irqrestore(&desc->lock, flags);
 
 out_thread:
-	raw_spin_unlock_irqrestore(&desc->lock, flags);
 	if (new->thread) {
 		struct task_struct *t = new->thread;
 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help