Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3995604ybi; Mon, 29 Jul 2019 17:07:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqx2pOlS6/s2M8P37rRDkkia7B1AK671XUAVtryy+YNETbzwofFa6p54B974t6c8w681fvjk X-Received: by 2002:a65:4786:: with SMTP id e6mr104050112pgs.448.1564445227894; Mon, 29 Jul 2019 17:07:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564445227; cv=none; d=google.com; s=arc-20160816; b=R/Cy2J+30wc79K9CjLuZ+aEFPIs0Ro2NSET58+/LjKP0Jj0WlCPXu7Kk5oL13I1Aj1 DUUX0tax2AN40v4fvKsR0cOt9fBiHOb2sAZe70c9HeBuyKul+cA8vAZpecQZfCSQBdtz nqyMwXVmaLFeWOXKZbNhIRqkVXbGV6mU7WM9sIiOv1JyG0TzWP9KJ/N1Pabjv9+A3A3w hSmuFLwIDuAN9Qwl6DY9094twKh4CbInp1y4Gi4j1vz7cknJ0ECMrSCIMOVyc9QCo7AX hzF8hHJugLUhb/TtcvMoNPzgyuUA6prA6XKOsk6i6arYZX2MPAatUewyv1X0DAGY/qL1 bn9Q== 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=EqqaEW7ndyWdESY7/cVM31u4jkwher2Ym6vbuegP86g=; b=abET8001pny7GPjnuhQ2/Bl5ogJB7kGvXjY4nAgQW/aUKZisF6vPuO6lKfSPoOuzO2 f39qDkz1GER0wRVyg2zH2qW5iZsYtPIWz7Y2jmRIw5aqL1ODpN1T2qy88BDQRhdYGaZB q0qexETwrZI71vyJPmW37rWwNGKjtv/lkheic/CZancTQ7lsIGUYO4kIrTjbnJyKbO4R u0MtHc7Tj0be5tm03nPFC8o6rpgxe4xCbCX10BtSD5OLlU5vTzxgKj0ECvyJ1i5+YHzF 9Exvuv0CmdsfNKRdzylYfDc5iLC4A8CS1LCKU6elWYj3EMhLngLTCCfShsUx7DdjYRYf Zpcg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=dnLKPoxN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s13si3910576pgn.123.2019.07.29.17.06.52; Mon, 29 Jul 2019 17:07:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=dnLKPoxN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729835AbfG2TdJ (ORCPT + 99 others); Mon, 29 Jul 2019 15:33:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:46976 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729778AbfG2TdF (ORCPT ); Mon, 29 Jul 2019 15:33:05 -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 61D1121655; Mon, 29 Jul 2019 19:33:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564428784; bh=B+4mkE2wlLtHn+8VNj1PDnu0y6OxojTs8LQSdPTpCJQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dnLKPoxN++RUxCUSug+lzx0X3+OmmvzlVZyGVxFwys/oX5S9sG++lxOQyKGTs8kXJ u1XgIGmSOzoySyi90D7ugcIca3yF2uP0WP9mOPCQKnFLesFEK5RJB0ee7tp1j87AwA jCkz+vVzAjzxZ4Mre2aSbfFgtpMT4DsT6lz2Ik54= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Taehee Yoo , "David S. Miller" Subject: [PATCH 4.14 183/293] caif-hsi: fix possible deadlock in cfhsi_exit_module() Date: Mon, 29 Jul 2019 21:21:14 +0200 Message-Id: <20190729190838.522437823@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190729190820.321094988@linuxfoundation.org> References: <20190729190820.321094988@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: Taehee Yoo [ Upstream commit fdd258d49e88a9e0b49ef04a506a796f1c768a8e ] cfhsi_exit_module() calls unregister_netdev() under rtnl_lock(). but unregister_netdev() internally calls rtnl_lock(). So deadlock would occur. Fixes: c41254006377 ("caif-hsi: Add rtnl support") Signed-off-by: Taehee Yoo Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/caif/caif_hsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/net/caif/caif_hsi.c +++ b/drivers/net/caif/caif_hsi.c @@ -1462,7 +1462,7 @@ static void __exit cfhsi_exit_module(voi rtnl_lock(); list_for_each_safe(list_node, n, &cfhsi_list) { cfhsi = list_entry(list_node, struct cfhsi, list); - unregister_netdev(cfhsi->ndev); + unregister_netdevice(cfhsi->ndev); } rtnl_unlock(); }