Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1842471pxa; Sun, 2 Aug 2020 23:49:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJYBWAaVJFOxIv+QMURhh5DVsN7ePMHcFvcJ+crtGqkiuD3pJFsLt9iYhk7vgo5Pru/py6 X-Received: by 2002:a17:906:9618:: with SMTP id s24mr15106176ejx.53.1596437354996; Sun, 02 Aug 2020 23:49:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596437354; cv=none; d=google.com; s=arc-20160816; b=FljzFrRkKWZ0MjHJOOry4sAiHv/l4ln2aW1a8O75UAZRdhL3WQZYSK/cpWhU+U3IG1 fpgs5mM2uXZ8Y9j5BMJ6qTbezhjvDbHSus+CBWYFQE2vvwsbzV5MHj2+u/Pxu+Xz4J7t 3byEy6ts/JJIP45F5UbWSdJA64Ub9qlNgRvHl82Z8Flag2Ka3gJHemqVpJXoONMQEnmJ op3nmtgCPVQLB311WdhudX251gJoB1hxRs1tui3gWkhXcXmbouno/VnNo2fV76SBKX/6 vsHd8K0ybWmfaaLZvCQQDYzeMG/RXhZk+5X6D68K+gjcLHTzyIe8eFgLGmTAUjBURFyR yH8g== 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:organization:message-id:date:subject:cc:to :from; bh=xtv0IVVKIAW4MCEjuu+nV5Xbcac7paYE8pOWY4t9UpU=; b=zMm0ayhAW4rnK+tbLZ1EH6XF2HDXnhBlzlncD3Jk8bLruaxWTgsMX/0+WeOJBhZIgS OVMmw+Bg2dOWuv1fPE3YLXIsyW3ktJOQsaWZMxav+AqVkjxRQD/J+GzMxBBgROxI/9GB H6QXDfB5iBnY8fJ/3DhTx8jeWh+IXlo2u5BiGPN+pg6THLrK6OHuKhjVxuSzVNXeSiwA dSjOw7qIBxVHw15feLCgEUDTq2oytpAkvV1QL2GjedkP8Fmcp66xIxD8SYrKgsMQJgfU Ui6TqGdUDlKcrCYiNb6iibc0FyVrYVZxC4wAW/hqteJnjy/uNNGzBUQX5J8WH1qodaMT 5RDw== 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 c15si428582edv.479.2020.08.02.23.48.52; Sun, 02 Aug 2020 23:49:14 -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 S1727120AbgHCGpE (ORCPT + 99 others); Mon, 3 Aug 2020 02:45:04 -0400 Received: from mailout05.rmx.de ([94.199.90.90]:45032 "EHLO mailout05.rmx.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725840AbgHCGpE (ORCPT ); Mon, 3 Aug 2020 02:45:04 -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 mailout05.rmx.de (Postfix) with ESMTPS id 4BKpKS1Xslz9xjp; Mon, 3 Aug 2020 08:45:00 +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 4BKpK73msMz2TSDj; Mon, 3 Aug 2020 08:44:43 +0200 (CEST) Received: from n95hx1g2.localnet (192.168.54.50) by mta.arri.de (192.168.100.104) with Microsoft SMTP Server (TLS) id 14.3.408.0; Mon, 3 Aug 2020 08:44:30 +0200 From: Christian Eggers To: Lars-Peter Clausen CC: Jonathan Cameron , , "Hartmut Knaack" , Peter Meerwald-Stadler , , Subject: Re: [PATCH] iio: trigger: sysfs: Disable irqs before calling iio_trigger_poll() Date: Mon, 3 Aug 2020 08:44:29 +0200 Message-ID: <4871626.01MspNxQH7@n95hx1g2> Organization: Arnold & Richter Cine Technik GmbH & Co. Betriebs KG In-Reply-To: <2443aad4-b631-bfe7-e79c-2cb585685a1e@metafoo.de> References: <20200727145714.4377-1-ceggers@arri.de> <2272098.D4WoNcAbr4@n95hx1g2> <2443aad4-b631-bfe7-e79c-2cb585685a1e@metafoo.de> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Originating-IP: [192.168.54.50] X-RMX-ID: 20200803-084449-4BKpK73msMz2TSDj-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 Hi Lars, On Monday, 3 August 2020, 08:37:43 CEST, Lars-Peter Clausen wrote: > The sysfs IIO trigger uses irq_work to schedule the iio_trigger_poll() > and the promise of irq_work is that the callback will run in hard IRQ > context. That's the whole point of it. > > irq_work_run_list(), which shows up in your callgraph, has as > BUG_ON(!irqs_disabled())[1], so we should never even get to calling > iio_trigger_poll() if IRQs where not disabled at this point. That's the > same condition that triggers the WARN_ON() in __handle_irq_event_percpu. is my patch sufficient, or would you prefer a different solution? > Are you using a non-upstream kernel? Maybe a RT kernel? I use v5.4.-rt regards Christian