Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp1101344ybg; Mon, 27 Jul 2020 07:59:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyTNz4VgAkmQ2kv8loRBjWmECMmWa3HpPd4dfPp2kPGpDGTs9dffPa7aPOl2JVFVRBZIPTK X-Received: by 2002:a17:906:4a87:: with SMTP id x7mr22303890eju.44.1595861945118; Mon, 27 Jul 2020 07:59:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595861945; cv=none; d=google.com; s=arc-20160816; b=IUtRlaQn8WKAp+PCyK3Kn2rA7XHwLpIzpH9kF4q56/YMzr8wJT1XtBDM0NjWq+R2JX tpnp3RtXeN4Qpiey+Pxnb8QTDvijr0zDJc5XxRlkuCA0QJxyClFBnqRvDwJMM53tE3uK CoYK4ermX8PnRaEQDeQqr/4G2M78SMIAVyDX3m37CtTXyk5xdt/rBPDMp2u76RuoK+vr At+Ca0qFvoL5ZE3PkI/c6JyDZ93rY+ckfObJKyqTyDbeCxbFgm7sxfHCfhhz4a+Iz1Xu lJOW9mHZ88PwiOhC+d+azQve8PNTGRDS3c11xn0+MkUdwlGURTFJRe7LIG7kKWbgBwL5 Tk2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=+EaAFnhR8bpepDfYRoj3mZOYUrkz67f7GoauZq7m1cU=; b=RrfrX3uoel+U3Yz1SXAZz1Kx6OdTuRcbb1aYNsMBzn83wIn+JNPXKBp/mkeVhxN+s8 7TsERDVqbscsTBCX92dyFBfuqXH0D6vjNFxsNge9LmVeSLGDDVFf7DE9jFmzHGO5qGcq tpMi8/jByHzKf9Nf/usxwlwsvPReLUMjDDU9+cOIamrkCDeZu8AxkgvyHetX4ZS5J7Wc riLXjoAS8l6XdddWDP1TfOzo4iK2pliMYxo6XmB3X0Wou82wCiQkA96L/0NdtFJn1Lpq qf88/9WsD4cmoQ6CWlz8iLQfECTopzHxn8lbHb1t/yoKLaP2LkLbzTzthEsBeW4EkozT /ITw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bx11si6654651edb.24.2020.07.27.07.58.43; Mon, 27 Jul 2020 07:59:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729785AbgG0O54 (ORCPT + 99 others); Mon, 27 Jul 2020 10:57:56 -0400 Received: from mailout06.rmx.de ([94.199.90.92]:57669 "EHLO mailout06.rmx.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728743AbgG0O54 (ORCPT ); Mon, 27 Jul 2020 10:57:56 -0400 Received: from kdin02.retarus.com (kdin02.dmz1.retloc [172.19.17.49]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mailout06.rmx.de (Postfix) with ESMTPS id 4BFjbM0xLcz9tVS; Mon, 27 Jul 2020 16:57:51 +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 kdin02.retarus.com (Postfix) with ESMTPS id 4BFjZw2vNzz2TTLj; Mon, 27 Jul 2020 16:57:28 +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:57:28 +0200 From: Christian Eggers To: Jonathan Cameron CC: Christian Eggers , , "Hartmut Knaack" , Lars-Peter Clausen , "Peter Meerwald-Stadler" , , Subject: [PATCH] iio: trigger: sysfs: Disable irqs before calling iio_trigger_poll() Date: Mon, 27 Jul 2020 16:57:13 +0200 Message-ID: <20200727145714.4377-1-ceggers@arri.de> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [192.168.54.121] X-RMX-ID: 20200727-165728-4BFjZw2vNzz2TTLj-0@kdin02 X-RMX-SOURCE: 217.111.95.66 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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-sysfs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/iio/trigger/iio-trig-sysfs.c b/drivers/iio/trigger/iio-trig-sysfs.c index e09e58072872..66a96b1632f8 100644 --- a/drivers/iio/trigger/iio-trig-sysfs.c +++ b/drivers/iio/trigger/iio-trig-sysfs.c @@ -94,7 +94,9 @@ static void iio_sysfs_trigger_work(struct irq_work *work) struct iio_sysfs_trig *trig = container_of(work, struct iio_sysfs_trig, work); + local_irq_disable(); iio_trigger_poll(trig->trig); + local_irq_enable(); } static ssize_t iio_sysfs_trigger_poll(struct device *dev, -- 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