Linux-IIO Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH 1/2] iio: trigger: hrtimer: Disable irqs before calling iio_trigger_poll()
@ 2020-07-27 14:58 Christian Eggers
  0 siblings, 0 replies; only message in thread
From: Christian Eggers @ 2020-07-27 14:58 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Christian Eggers, stable, Hartmut Knaack, Lars-Peter Clausen,
	Peter Meerwald-Stadler, Geert Uytterhoeven, Alexandru Ardelean,
	linux-iio, linux-kernel

iio_trigger_poll() calls generic_handle_irq(). This function expects to
be run with local IRQs disabled.

Signed-off-by: Christian Eggers <ceggers@arri.de>
Cc: stable@vger.kernel.org
---
 drivers/iio/trigger/iio-trig-hrtimer.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/iio/trigger/iio-trig-hrtimer.c b/drivers/iio/trigger/iio-trig-hrtimer.c
index f59bf8d58586..2fe8a5c1484e 100644
--- a/drivers/iio/trigger/iio-trig-hrtimer.c
+++ b/drivers/iio/trigger/iio-trig-hrtimer.c
@@ -89,7 +89,9 @@ static enum hrtimer_restart iio_hrtimer_trig_handler(struct hrtimer *timer)
 	info = container_of(timer, struct iio_hrtimer_info, timer);
 
 	hrtimer_forward_now(timer, info->period);
+	local_irq_disable();
 	iio_trigger_poll(info->swt.trigger);
+	local_irq_enable();
 
 	return HRTIMER_RESTART;
 }
-- 
Christian Eggers
Embedded software developer

Arnold & Richter Cine Technik GmbH & Co. Betriebs KG
Sitz: Muenchen - Registergericht: Amtsgericht Muenchen - Handelsregisternummer: HRA 57918
Persoenlich haftender Gesellschafter: Arnold & Richter Cine Technik GmbH
Sitz: Muenchen - Registergericht: Amtsgericht Muenchen - Handelsregisternummer: HRB 54477
Geschaeftsfuehrer: Dr. Michael Neuhaeuser; Stephan Schenk; Walter Trauninger; Markus Zeiler


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-27 14:58 [PATCH 1/2] iio: trigger: hrtimer: Disable irqs before calling iio_trigger_poll() Christian Eggers

Linux-IIO Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-iio/0 linux-iio/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-iio linux-iio/ https://lore.kernel.org/linux-iio \
		linux-iio@vger.kernel.org
	public-inbox-index linux-iio

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-iio


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git