From patchwork Mon Oct 5 15:26:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 290598 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0E30BC4727F for ; Mon, 5 Oct 2020 15:41:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BA715206DD for ; Mon, 5 Oct 2020 15:41:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601912512; bh=qOQeV9RGEa4LUUa7YjUZi3sJdySKG8IIz7seCuhc5jI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=Wwd4U+AptCSqoxWg4RFZ7Ds+mPrmiA4VhoMLecn17Ra12BLZEXKmzx5sP8TgLiDeF 9sk3v4QU5jZIiHphljMwKC4hPzB7bbaRDWOvBngOG7o1RNDseSuZ3mNRtLepbdXrCP j7xDltRs0SHg4/bIZ78v8GIOWk1cUS4xowTwU6t0= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727489AbgJEPlw (ORCPT ); Mon, 5 Oct 2020 11:41:52 -0400 Received: from mail.kernel.org ([198.145.29.99]:53718 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727426AbgJEP2j (ORCPT ); Mon, 5 Oct 2020 11:28:39 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (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 997DB20637; Mon, 5 Oct 2020 15:28:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601911719; bh=qOQeV9RGEa4LUUa7YjUZi3sJdySKG8IIz7seCuhc5jI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=A2si45zdIDbh5cgl41ZMdFfsZgp15xCOIYAL/zzvVjHh/ir447p4XY9QgJo5XzzmR GeqANLXGBJV3BSQfdnUasUz2TDs1BvW66RF2BCOI4gE0ImjmTpRjLjV3QKkGGsZC4c bAVPW/iXHVsNXq8zbjrAs4IOHi+q26OD7Mm94pgw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, u.kleine-koenig@pengutronix.de, Ahmad Fatoum , Bartosz Golaszewski Subject: [PATCH 5.4 04/57] gpio: siox: explicitly support only threaded irqs Date: Mon, 5 Oct 2020 17:26:16 +0200 Message-Id: <20201005142110.016866225@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201005142109.796046410@linuxfoundation.org> References: <20201005142109.796046410@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Ahmad Fatoum commit 45ccf6556720293323c20cda717756014ff63007 upstream. 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 Fixes: be8c8facc707 ("gpio: new driver to work with a 8x12 siox") Cc: stable@vger.kernel.org Signed-off-by: Ahmad Fatoum Acked-by: Uwe Kleine-König Signed-off-by: Bartosz Golaszewski Signed-off-by: Greg Kroah-Hartman --- drivers/gpio/gpio-siox.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/gpio/gpio-siox.c +++ b/drivers/gpio/gpio-siox.c @@ -245,6 +245,7 @@ static int gpio_siox_probe(struct siox_d 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)