From patchwork Mon Jul 27 14:58:59 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Eggers X-Patchwork-Id: 11687023 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6847E138A for ; Mon, 27 Jul 2020 14:59:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4FF602083E for ; Mon, 27 Jul 2020 14:59:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728839AbgG0O7x (ORCPT ); Mon, 27 Jul 2020 10:59:53 -0400 Received: from mailout10.rmx.de ([94.199.88.75]:60088 "EHLO mailout10.rmx.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728776AbgG0O7x (ORCPT ); Mon, 27 Jul 2020 10:59:53 -0400 X-Greylist: delayed 673 seconds by postgrey-1.27 at vger.kernel.org; Mon, 27 Jul 2020 10:59:52 EDT Received: from kdin01.retarus.com (kdin01.dmz1.retloc [172.19.17.48]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mailout10.rmx.de (Postfix) with ESMTPS id 4BFjdd30Rvz36nt; Mon, 27 Jul 2020 16:59:49 +0200 (CEST) Received: from mta.arri.de (unknown [217.111.95.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by kdin01.retarus.com (Postfix) with ESMTPS id 4BFjd050Rmz2xFT; Mon, 27 Jul 2020 16:59:16 +0200 (CEST) Received: from N95HX1G2.wgnetz.xx (192.168.54.121) by mta.arri.de (192.168.100.104) with Microsoft SMTP Server (TLS) id 14.3.408.0; Mon, 27 Jul 2020 16:59:16 +0200 From: Christian Eggers To: Jonathan Cameron CC: Christian Eggers , , "Hartmut Knaack" , Lars-Peter Clausen , "Peter Meerwald-Stadler" , Geert Uytterhoeven , Alexandru Ardelean , , Subject: [PATCH 1/2] iio: trigger: hrtimer: Disable irqs before calling iio_trigger_poll() Date: Mon, 27 Jul 2020 16:58:59 +0200 Message-ID: <20200727145900.4563-1-ceggers@arri.de> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 X-Originating-IP: [192.168.54.121] X-RMX-ID: 20200727-165916-4BFjd050Rmz2xFT-0@kdin01 X-RMX-SOURCE: 217.111.95.66 Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org iio_trigger_poll() calls generic_handle_irq(). This function expects to be run with local IRQs disabled. Signed-off-by: Christian Eggers 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; }