Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp882958pxa; Sat, 1 Aug 2020 09:03:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/IfdAr3zSLBUfGt84C6pyhD4/4shVwX9gOq3VHG1a+3LN8v74/U/mD33ur7SumGdopTQz X-Received: by 2002:a50:fd16:: with SMTP id i22mr8721599eds.281.1596297793592; Sat, 01 Aug 2020 09:03:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596297793; cv=none; d=google.com; s=arc-20160816; b=z8KdK8VTKXg96EF13gytvCYQgN3J8yheEChALboMCi5swCReH4mfWGGJzmq5s1fB7V vutvIM/ZjQ2fnUlOwmAuJ/R4dxdxqEXcGoVtXVCZkFfPWaKIT74RMJ8OMUkvkTGBIRe1 dlxkQGbMXNKaS3jENiaDfTBReZUpcvOmN1/qYJVE9sdPaLQQ3P45pPhQ3jPSczryhi4Z KwNfVbp6ijmOvTTWN9rk++8eMGklIZ2xvm6S8GB9uE1AIDEHu0ejbiPrbJ1B7+KBY3A/ MDTz6Q1wj5mrfilOfWhYdu6xzNQZNNj3MVZtuOL8Rt7XRF27f7h1Ro1MdDcVJ8voaXnw rW/g== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=Q1vs4PqJYF6G7z/u3lRzTUOfUcoc9GA96qzA+R15jvA=; b=dX4ep2AAbFGwcIpGi/+AAJD0UQtJDvhqobUIuND3VN87KnHpObvIgY8FL3QwLt6Mp6 vgURXSzHTaqwqlHtu3YNzJVMB5bnElKFTCqlj1mtAmcw5dKvD1DHlJhpKuXeEZozGbaN 5GS/trbPUVDZmarnj4CqCszO70qdWvp0/YvIeEPr60KXcSgvXjK9LFt0WnBybLRkcpnB 6aCJwM0f6fwopN9+vkyMvT+8ruWO03Az9otFab+LS4VBMWjwML25ctRAT9hTjz7ct2Gr xO8/S5Xj4gcxVk7Yi53ipn80kOkYhLW6xsL47x05iBUTm53KftK+/u3suU/j9HogMq4e ZufQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=YwHwRk01; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o17si7535129ejg.650.2020.08.01.09.02.51; Sat, 01 Aug 2020 09:03:13 -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; dkim=pass header.i=@kernel.org header.s=default header.b=YwHwRk01; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726494AbgHAQCo (ORCPT + 99 others); Sat, 1 Aug 2020 12:02:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:54276 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725841AbgHAQCn (ORCPT ); Sat, 1 Aug 2020 12:02:43 -0400 Received: from archlinux (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 487AA207BC; Sat, 1 Aug 2020 16:02:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596297763; bh=p2oDC8N96YV8ZYXENTyf4/gTFtcs++qxxMizDPrcRDg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=YwHwRk01ZdxpAR7bbkL/Psag7Er8KU65zF/vJW/GDIO4EhfSKtjwqmELyMfHmwGvr csVCHv7u8gvajzdrvWYiywe/hLiCKs+/rgctewH8QYauc+KLedUkh63tuCL3b1vEwe 4VxHmyBJbu6hZv25YpVbFhY85erKyHZePQMc49oM= Date: Sat, 1 Aug 2020 17:02:34 +0100 From: Jonathan Cameron To: Christian Eggers Cc: , "Hartmut Knaack" , Lars-Peter Clausen , "Peter Meerwald-Stadler" , , Subject: Re: [PATCH] iio: trigger: sysfs: Disable irqs before calling iio_trigger_poll() Message-ID: <20200801170234.2953b087@archlinux> In-Reply-To: <20200727145714.4377-1-ceggers@arri.de> References: <20200727145714.4377-1-ceggers@arri.de> X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 27 Jul 2020 16:57:13 +0200 Christian Eggers wrote: > iio_trigger_poll() calls generic_handle_irq(). This function expects to > be run with local IRQs disabled. Was there an error or warning that lead to this patch? Or can you point to what call in generic_handle_irq is making the assumption that we are breaking? Given this is using the irq_work framework I'm wondering if this is a more general problem? Basically more info please! Thanks, Jonathan > > 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,