Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp6135467iog; Thu, 23 Jun 2022 12:05:23 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tF7hXkEnUUVkZPzwH/LtR2NeJl4U9WufTqW9vToTpPmhEf8l6IxgDNhXlZhnjLI9d+YB71 X-Received: by 2002:a17:906:49d4:b0:6d6:e5ec:9a23 with SMTP id w20-20020a17090649d400b006d6e5ec9a23mr9782096ejv.79.1656011123604; Thu, 23 Jun 2022 12:05:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656011123; cv=none; d=google.com; s=arc-20160816; b=AXfhNRa6rGNfEr2g3j5lpiLnt340PpYijN2LWByM8tXp1elxCP3JLQN7D7OSOcZDcF 83fH/JyPmnEhI67IodgmQPx7PD5yvnKo6C1DMR3xkkEgzN1ApQY0+6FhtKBO4AfeOIwE dtY0ukKevgev9DSYTqvdJ9pCydMKHekt98kQOTpXLXDFQMo/SyLMUIhS23Poqfm9rZQd g8zrmobkFV0JGXpSGABsuJoti2rT2Vk6VIuUg/io8ucC4AD4u3hPEGXiD4rihZA20aZX t4T/VRfAjwqSUr6iHFEKlET7l1c5cFJMAbjbEczbOrqme1R92bohfTYIsqZV4UtZNIWp Ghvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=f9Cy3CJfHrjgIv+c8154kzL+pxgz5BEV5G989VkDvII=; b=Bd0wQ5R3ZdgEzzrIt5x4hvWVBmOnY0Teu9NtnWvdjYB6pEiL+clycgCdTEfrflWWgR IpMZ3hzGSDTGqqubNllaHO8rUE48DruEc7SX5tNdQ3fixLzAxOyyu3DoG/ZRftNDnyzQ g5F3s+upwI4pI8HYlCHJhRb0bG8uTRJGQsqXOD+JBqejcEXkkihYhYTR09rXqb3Urjz2 LE2vkYUEVm6NkfF6fMkW4TgqGiYMuGJqFaeM8jsA68/nq1qGY6gj77cwoAoskPA8nqIu ZeAiiutlF0I9DUy7v6P06uGq3wEUeLU3WdKM/eIHWi3IrSb6RwvG5cajJHksz481KTUA XgOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=fS9rltE3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y8-20020a056402440800b00435d7a4a529si442261eda.346.2022.06.23.12.04.58; Thu, 23 Jun 2022 12:05:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=fS9rltE3; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236848AbiFWSSz (ORCPT + 99 others); Thu, 23 Jun 2022 14:18:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40940 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236741AbiFWSQI (ORCPT ); Thu, 23 Jun 2022 14:16:08 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC0AF4F465; Thu, 23 Jun 2022 10:22:34 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 99B6CB824B8; Thu, 23 Jun 2022 17:22:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 118C0C3411B; Thu, 23 Jun 2022 17:22:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1656004952; bh=qvQ+DoApFMSYGyUqTdbIgWetXlmQvXHjNbqiyeHETKo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fS9rltE3QuWPp7uiKh7tqCEHoyQ41Pgimw3oGD3bruula+xtapZWJ5Q7DTxQJJKWs nF+bjFTpZ3Uk/evLLPuXbVMpmDjQaVMWXouCU3LE0ctMsyJwWKIM3nKDunGb3vsqoJ 5zXHknaaSQVzG+1X3BUwoKRXAQBpHLpOxwJTyrvI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Vincent Whitchurch , Sasha Levin Subject: [PATCH 4.19 202/234] tty: goldfish: Fix free_irq() on remove Date: Thu, 23 Jun 2022 18:44:29 +0200 Message-Id: <20220623164348.767165728@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220623164343.042598055@linuxfoundation.org> References: <20220623164343.042598055@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Vincent Whitchurch [ Upstream commit 499e13aac6c762e1e828172b0f0f5275651d6512 ] Pass the correct dev_id to free_irq() to fix this splat when the driver is unbound: WARNING: CPU: 0 PID: 30 at kernel/irq/manage.c:1895 free_irq Trying to free already-free IRQ 65 Call Trace: warn_slowpath_fmt free_irq goldfish_tty_remove platform_remove device_remove device_release_driver_internal device_driver_detach unbind_store drv_attr_store ... Fixes: 465893e18878e119 ("tty: goldfish: support platform_device with id -1") Signed-off-by: Vincent Whitchurch Link: https://lore.kernel.org/r/20220609141704.1080024-1-vincent.whitchurch@axis.com Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin --- drivers/tty/goldfish.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/goldfish.c b/drivers/tty/goldfish.c index abc84d84f638..9180ca5e4dcd 100644 --- a/drivers/tty/goldfish.c +++ b/drivers/tty/goldfish.c @@ -428,7 +428,7 @@ static int goldfish_tty_remove(struct platform_device *pdev) tty_unregister_device(goldfish_tty_driver, qtty->console.index); iounmap(qtty->base); qtty->base = NULL; - free_irq(qtty->irq, pdev); + free_irq(qtty->irq, qtty); tty_port_destroy(&qtty->port); goldfish_tty_current_line_count--; if (goldfish_tty_current_line_count == 0) -- 2.35.1