From: tip-bot for Thomas Gleixner <tglx@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, agordeev@redhat.com, hpa@zytor.com,
mingo@redhat.com, ido@wizery.com, tglx@linutronix.de
Subject: [tip:irq/core] genirq: Remove paranoid warnons and bogus fixups
Date: Fri, 16 Mar 2012 03:34:31 -0700 [thread overview]
Message-ID: <tip-e04268b0effc0ceea366c50b3107baad9edadafa@git.kernel.org> (raw)
In-Reply-To: <20120315190755.GA6732@dhcp-26-207.brq.redhat.com>
Commit-ID: e04268b0effc0ceea366c50b3107baad9edadafa
Gitweb: http://git.kernel.org/tip/e04268b0effc0ceea366c50b3107baad9edadafa
Author: Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Thu, 15 Mar 2012 22:55:21 +0100
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Fri, 16 Mar 2012 11:27:28 +0100
genirq: Remove paranoid warnons and bogus fixups
Alexander pointed out that the warnons in the regular exit path are
bogus and the thread_mask one actually could be triggered when
__setup_irq() hands out that thread_mask again after __free_irq()
dropped irq_desc->lock.
Thinking more about it, neither IRQTF_RUNTHREAD nor the bit in
thread_mask can be set as this is the regular exit path. We come here
due to:
__free_irq()
remove action from desc
synchronize_irq()
kthread_stop()
So synchronize_irq() makes sure that the thread finished running and
cleaned up both the thread_active count and thread_mask. After that
point nothing can set IRQTF_RUNTHREAD on this action. So the warnons
and the cleanups are pointless.
Reported-by: Alexander Gordeev <agordeev@redhat.com>
Cc: Ido Yariv <ido@wizery.com>
Link: http://lkml.kernel.org/r/20120315190755.GA6732@dhcp-26-207.brq.redhat.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
kernel/irq/manage.c | 14 ++++----------
1 files changed, 4 insertions(+), 10 deletions(-)
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 453feed..b0ccd1a 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -804,17 +804,11 @@ static int irq_thread(void *data)
* This is the regular exit path. __free_irq() is stopping the
* thread via kthread_stop() after calling
* synchronize_irq(). So neither IRQTF_RUNTHREAD nor the
- * oneshot mask bit should be set.
+ * oneshot mask bit can be set. We cannot verify that as we
+ * cannot touch the oneshot mask at this point anymore as
+ * __setup_irq() might have given out currents thread_mask
+ * again.
*
- * Verify that this is true.
- */
- if (WARN_ON(test_and_clear_bit(IRQTF_RUNTHREAD, &action->thread_flags)))
- wake_threads_waitq(desc);
-
- if (WARN_ON(desc->threads_oneshot & action->thread_mask))
- irq_finalize_oneshot(desc, action, true);
-
- /*
* Clear irq_thread. Otherwise exit_irq_thread() would make
* fuzz about an active irq thread going into nirvana.
*/
prev parent reply other threads:[~2012-03-16 10:34 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-02 16:24 [RFC] genirq: Flush the irq thread on synchronization Ido Yariv
2011-12-02 23:21 ` Thomas Gleixner
2011-12-04 19:09 ` Ido Yariv
2011-12-16 10:48 ` Ido Yariv
2012-02-13 9:43 ` Ido Yariv
2012-02-15 14:34 ` Thomas Gleixner
2012-03-01 10:54 ` Ido Yariv
2011-12-05 21:55 ` Thomas Gleixner
2011-12-06 23:28 ` Ido Yariv
2011-12-07 0:48 ` Thomas Gleixner
2011-12-07 8:21 ` Ido Yariv
2012-03-14 11:07 ` [tip:irq/core] " tip-bot for Ido Yariv
2012-03-15 19:07 ` Alexander Gordeev
2012-03-15 19:27 ` Thomas Gleixner
2012-03-15 22:59 ` Ido Yariv
2012-03-16 10:06 ` Thomas Gleixner
2012-03-16 10:34 ` tip-bot for Thomas Gleixner [this message]
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=tip-e04268b0effc0ceea366c50b3107baad9edadafa@git.kernel.org \
--to=tglx@linutronix.de \
--cc=agordeev@redhat.com \
--cc=hpa@zytor.com \
--cc=ido@wizery.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@redhat.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).