public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Rishabh Bhatnagar <risbhat@amazon.com>
To: <stable@vger.kernel.org>
Cc: <gregkh@linuxfoundation.org>, <sashal@kernel.org>,
	<tglx@linutronix.de>, <mingo@redhat.com>,
	<linux-kernel@vger.kernel.org>, <benh@amazon.com>,
	<mbacco@amazon.com>, Marc Zyngier <marc.zyngier@arm.com>,
	Rishabh Bhatnagar <risbhat@amazon.com>
Subject: [PATCH 4/6] genirq: Fix misleading synchronize_irq() documentation
Date: Thu, 29 Sep 2022 21:06:49 +0000	[thread overview]
Message-ID: <20220929210651.12308-5-risbhat@amazon.com> (raw)
In-Reply-To: <20220929210651.12308-1-risbhat@amazon.com>

From: Thomas Gleixner <tglx@linutronix.de>

commit 1d21f2af8571c6a6a44e7c1911780614847b0253 upstream.

The function might sleep, so it cannot be called from interrupt
context. Not even with care.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Link: https://lkml.kernel.org/r/20190628111440.189241552@linutronix.de
Signed-off-by: Rishabh Bhatnagar <risbhat@amazon.com>
---
 kernel/irq/manage.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 4e4fc7879307..a72d7ae0418b 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -96,7 +96,8 @@ EXPORT_SYMBOL(synchronize_hardirq);
  *	to complete before returning. If you use this function while
  *	holding a resource the IRQ handler may need you will deadlock.
  *
- *	This function may be called - with care - from IRQ context.
+ *	Can only be called from preemptible code as it might sleep when
+ *	an interrupt thread is associated to @irq.
  */
 void synchronize_irq(unsigned int irq)
 {
-- 
2.37.1


  parent reply	other threads:[~2022-09-29 21:08 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-29 21:06 [PATCH 0/6] IRQ handling patches backport to 4.14 stable Rishabh Bhatnagar
2022-09-29 21:06 ` [PATCH 1/6] genirq: Update code comments wrt recycled thread_mask Rishabh Bhatnagar
2022-09-29 21:06 ` [PATCH 2/6] genirq: Synchronize only with single thread on free_irq() Rishabh Bhatnagar
2022-09-29 21:06 ` [PATCH 3/6] genirq: Delay deactivation in free_irq() Rishabh Bhatnagar
2022-09-29 21:06 ` Rishabh Bhatnagar [this message]
2022-09-29 21:06 ` [PATCH 5/6] genirq: Add optional hardware synchronization for shutdown Rishabh Bhatnagar
2022-09-29 21:06 ` [PATCH 6/6] x86/ioapic: Implement irq_get_irqchip_state() callback Rishabh Bhatnagar
2022-10-02 15:30 ` [PATCH 0/6] IRQ handling patches backport to 4.14 stable Greg KH
2022-10-03 17:54   ` Bhatnagar, Rishabh
2022-10-07  3:07   ` Herrenschmidt, Benjamin
2022-10-09 17:50     ` Bhatnagar, Rishabh
2022-10-14 19:00       ` Bhatnagar, Rishabh
2022-10-15 15:36         ` gregkh
2022-10-27 10:13 ` Greg KH

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=20220929210651.12308-5-risbhat@amazon.com \
    --to=risbhat@amazon.com \
    --cc=benh@amazon.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marc.zyngier@arm.com \
    --cc=mbacco@amazon.com \
    --cc=mingo@redhat.com \
    --cc=sashal@kernel.org \
    --cc=stable@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox