Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2931967ybk; Mon, 18 May 2020 11:24:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwqmozZTIDUqaiIpjqTiOaA1jP9FRHqAT5Ds2zF682MMDLa7T9ePNC7zntS99aJ1WTJ7/LF X-Received: by 2002:a17:906:4d9a:: with SMTP id s26mr15534720eju.153.1589826280681; Mon, 18 May 2020 11:24:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589826280; cv=none; d=google.com; s=arc-20160816; b=JAkrO9T0DQte16HcrtwlZe/S8eL1XFEk2l6tGfwDyHY2ib2egZ5lmhsangH04CXGAt vxrmGzzyFCezZ3hquEbj/A/Nz0pv6qyT7eTP7KmPgtUkF58oOIx5n++ab+q+7nCkNENl s1GiDuUpDDtIOJGc/lNtjPu1AmloAUvOfnIAaqlZYGxONCuZfHfnYo5Zj06hqJvgvCim jugqK4UZZQFfqvTLs7DetvD1H9w6ihqMjxpc+stK3wvrHDgPugekIMbeUwPhI6Eu4LUw 5FPsf60acindhI5Z639ZnrsK6T9ozQEupy2fOhStQAVPIDHvgo2q6lMHKiYkSMPLJKbI UyPA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=PacADPFNWFs5xaxZ1IA1Wz72xwqjPZA4sbd26VcV4ng=; b=YueWkANLpJEkN9gEgt7P3iFNAaJADFM+R/SotCXGgs8+rOq6lY8dsq9GY3nfxSu1aX lrlq/Nt3ObZ0UEMRrtKCzhxMF1cBtQ8UfsAcjTS78t5tdqOXxwRtMxV+YipPUaLqtwAN jT75kD8XyWl94qS/X4J+15P0qX4ZeW7YByIQ9xYF4Wm4goTNVVCxbOewZumb22cfsXCE 3CNXODgGZWt5J9fdFWq5BsthBaR4rwyEt3QkmVPPsI4PkFyVpqZroFf7eHEaXeWqaK7B 1gbSiXiCVXT6p/jAtSx5aKFJvggcjp6Ysu3yCMZ3yRQgv3apv3PNqBbXV2i7Iy8c2kQM A3WA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=hJrx6oZg; 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 q12si6973972edc.413.2020.05.18.11.24.17; Mon, 18 May 2020 11:24:40 -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=hJrx6oZg; 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 S1730834AbgERRvO (ORCPT + 99 others); Mon, 18 May 2020 13:51:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:53744 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730829AbgERRvK (ORCPT ); Mon, 18 May 2020 13:51:10 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 85C9F20674; Mon, 18 May 2020 17:51:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1589824270; bh=v17KLpkrUK8PVtqnolrS1fM1oTtoXKQykSbkQwFs/cU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hJrx6oZggjKNW1LRiAOLvr4DMB93cOmymIaLv8k5SJWcPSKvNY554lz9380Dj3bvx ZckAWTv0SZNdh9iqpLB0d1cEIIfTDO04/fkqd5EV2jcrEh2Pgknk9uKJv1EdAJnmyf Dpnvj5UYSLqIf7VY5VHNknSYx3rfYaq9bcALXWIM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christophe JAILLET , "David S. Miller" , Sasha Levin Subject: [PATCH 4.19 04/80] net: moxa: Fix a potential double free_irq() Date: Mon, 18 May 2020 19:36:22 +0200 Message-Id: <20200518173451.021483004@linuxfoundation.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200518173450.097837707@linuxfoundation.org> References: <20200518173450.097837707@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Christophe JAILLET [ Upstream commit ee8d2267f0e39a1bfd95532da3a6405004114b27 ] Should an irq requested with 'devm_request_irq' be released explicitly, it should be done by 'devm_free_irq()', not 'free_irq()'. Fixes: 6c821bd9edc9 ("net: Add MOXA ART SoCs ethernet driver") Signed-off-by: Christophe JAILLET Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/moxa/moxart_ether.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/moxa/moxart_ether.c b/drivers/net/ethernet/moxa/moxart_ether.c index b34055ac476f7..4db3431b79ac1 100644 --- a/drivers/net/ethernet/moxa/moxart_ether.c +++ b/drivers/net/ethernet/moxa/moxart_ether.c @@ -561,7 +561,7 @@ static int moxart_remove(struct platform_device *pdev) struct net_device *ndev = platform_get_drvdata(pdev); unregister_netdev(ndev); - free_irq(ndev->irq, ndev); + devm_free_irq(&pdev->dev, ndev->irq, ndev); moxart_mac_free_memory(ndev); free_netdev(ndev); -- 2.20.1