Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3288616pxk; Mon, 7 Sep 2020 08:34:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyETx5czOqAf92niI2i8Axe92TbmEizF2HdT/aTgdEo6qv6R/w4KRTbrFd7Se8HoJiI0zo+ X-Received: by 2002:a17:906:2f02:: with SMTP id v2mr20487128eji.465.1599492895654; Mon, 07 Sep 2020 08:34:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599492895; cv=none; d=google.com; s=arc-20160816; b=cgjEOIW9sBk3jPSf+hErsXNLqSl9BIgKcE4mdsn5BDxRobD3y3TLsxiqBg2A4BuFL8 UTj57AkRdoG4Pr/w//vVTS9nEFiOD2hDlNtB7IB6praRHe+NKkFC+ot7Pb1KjyvoxXzL yfkDC1RNAJyYm3bqjPeLBWu4EISmCabkOaPqXh3F+gWpX5vVdCJsg0WMGVsHCiF8eCr8 tDUrvHKP4wGnvRFpb+g8oSOwluSRocmXXNKDUEzoPw56WkKGnmiTsYVl/R17ZZp1xqdp J6yiQ2I+VTExIe/1fHY3nftNNkwxdhMig1XMOLu8sfgmirRXhAC7r2Znj8cE1xjUoil6 YVzQ== 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=3FCiAnUo6JhdGWvOj2IQoGl6reAvXfRQtncoaEVYExA=; b=UaN9bX9Q0ZBvsdB1fvoBa1rhWihxfOcEKTRQ2e+cpTggyRD+blPqUyWQIOp2NuT2lm SPUSsBxRMK8ydMlIO5XectFt0ODyZffBqdqgDPRTa3d/TrPoFUhEDnxEcfOhrKhiAgxy 7g6UInsruHY2g2Df6/9HfEG561dG+qQt9faz9ffmGAl7EmHbXsTj+OqOqaFE+KXM2MFo nrV7PZoWJlhbQBBdg/x2D4CARUP1W4tibZbo3jrmZuquRvIk/umt4c6oLNoKVcH2rd0I IP5lKo9A1K60UuNuK3jRV691G6QvjLEnLcsGuNCevUVjT/A+OcbkJJm4aMOcH13WLzq8 oDNg== 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 bh4si10686807ejb.193.2020.09.07.08.34.31; Mon, 07 Sep 2020 08:34:55 -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 S1730075AbgIGPdr (ORCPT + 99 others); Mon, 7 Sep 2020 11:33:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730090AbgIGPck (ORCPT ); Mon, 7 Sep 2020 11:32:40 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C6AFBC061574 for ; Mon, 7 Sep 2020 08:32:34 -0700 (PDT) Received: from dude.hi.pengutronix.de ([2001:67c:670:100:1d::7]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kFJ8A-0003iH-L1; Mon, 07 Sep 2020 17:32:30 +0200 Received: from afa by dude.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1kFJ89-0000sv-Jp; Mon, 07 Sep 2020 17:32:29 +0200 From: Ahmad Fatoum To: Thorsten Scherer , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Pengutronix Kernel Team , Linus Walleij , Bartosz Golaszewski Cc: tglx@linutronix.de, Ahmad Fatoum , linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] gpio: siox: explicitly support only threaded irqs Date: Mon, 7 Sep 2020 17:31:35 +0200 Message-Id: <20200907153135.3307-1-a.fatoum@pengutronix.de> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::7 X-SA-Exim-Mail-From: afa@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The gpio-siox driver uses handle_nested_irq() to implement its interrupt support. This is only capable of handling threaded irq actions. For a hardirq action it triggers a NULL pointer oops. (It calls action->thread_fn which is NULL then.) Prevent registration of a hardirq action by setting gpio_irq_chip::threaded to true. Cc: u.kleine-koenig@pengutronix.de Signed-off-by: Ahmad Fatoum --- v1 -> v2: reworded commit message (Uwe) --- drivers/gpio/gpio-siox.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpio/gpio-siox.c b/drivers/gpio/gpio-siox.c index 26e1fe092304..f8c5e9fc4bac 100644 --- a/drivers/gpio/gpio-siox.c +++ b/drivers/gpio/gpio-siox.c @@ -245,6 +245,7 @@ static int gpio_siox_probe(struct siox_device *sdevice) girq->chip = &ddata->ichip; girq->default_type = IRQ_TYPE_NONE; girq->handler = handle_level_irq; + girq->threaded = true; ret = devm_gpiochip_add_data(dev, &ddata->gchip, NULL); if (ret) -- 2.28.0