From: Dan Carpenter <error27@gmail.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch] genirq: incorrect unlock in __setup_irq()
Date: Thu, 17 Mar 2011 11:43:07 +0000 [thread overview]
Message-ID: <20110317114307.GJ2008@bicker> (raw)
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;
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <error27@gmail.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch] genirq: incorrect unlock in __setup_irq()
Date: Thu, 17 Mar 2011 14:43:07 +0300 [thread overview]
Message-ID: <20110317114307.GJ2008@bicker> (raw)
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;
next reply other threads:[~2011-03-17 11:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-17 11:43 Dan Carpenter [this message]
2011-03-17 11:43 ` [patch] genirq: incorrect unlock in __setup_irq() Dan Carpenter
2011-03-17 20:08 ` Steven Rostedt
2011-03-17 20:08 ` Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110317114307.GJ2008@bicker \
--to=error27@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.