public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] genirq: incorrect unlock in __setup_irq()
@ 2011-03-17 11:43 Dan Carpenter
  2011-03-17 20:08 ` Steven Rostedt
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2011-03-17 11:43 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: linux-kernel, kernel-janitors

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 <error27@gmail.com>

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;
 

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-03-17 20:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-17 11:43 [patch] genirq: incorrect unlock in __setup_irq() Dan Carpenter
2011-03-17 20:08 ` Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox