Sfoglia il codice sorgente

genirq: Fix incorrect unlock in __setup_irq()

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"

[ tglx: Moved unlock before free_cpumask_var() ]

Signed-off-by: Dan Carpenter <error27@gmail.com>
LKML-Reference: <20110317114307.GJ2008@bicker>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Dan Carpenter 14 anni fa
parent
commit
1c389795c1
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      kernel/irq/manage.c

+ 1 - 1
kernel/irq/manage.c

@@ -1064,10 +1064,10 @@ mismatch:
 	ret = -EBUSY;
 	ret = -EBUSY;
 
 
 out_mask:
 out_mask:
+	raw_spin_unlock_irqrestore(&desc->lock, flags);
 	free_cpumask_var(mask);
 	free_cpumask_var(mask);
 
 
 out_thread:
 out_thread:
-	raw_spin_unlock_irqrestore(&desc->lock, flags);
 	if (new->thread) {
 	if (new->thread) {
 		struct task_struct *t = new->thread;
 		struct task_struct *t = new->thread;