Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp4130802ybe; Mon, 9 Sep 2019 04:51:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqx68W4mqSOWVRWDv5u4WRvruzZ679Xbns2DPU06tDZraxziyc6MOaAEthk0nwu3ZBA/BUug X-Received: by 2002:a50:c19a:: with SMTP id m26mr23543026edf.184.1568029882097; Mon, 09 Sep 2019 04:51:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568029882; cv=none; d=google.com; s=arc-20160816; b=z8Mn10Tu0MuB09RhWyRCiTirDedG+OOt2ybTZameL01mfD/heqSa25nKGbbHrqjFQ8 6BWR+5Z6E4VTnK7yxzQ5aiqK0lxqcH6hKoPNNPhsEU1QlZT2hjP8HjpKap6hgs/NPMpE B1Ne1P6nWMAPISCdPFxhXUsljVTxp5otN5k3lRdViHENpXVAAMm5Qb5guA3uac+TZda7 4BxCkZ2o1vtQ98fXnbfm58DGbjWVAwLb2yOF+CKxZq8OJVNKLBtIegP+9qls29igNeDF khvN8dji3LvAmcekshVq2WnbTOZXN05zQD0gix7ek96N2q4Vl2xtqXO2yHMmnmw04NuR eJKQ== 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=zEiQzMD397OWVUerd6+HV9/CWEOeHz2IHKU1hqOVM9k=; b=d6rZ6Ut5hS/fZ8RXhLfLjZO+JyPATzlUhe6qxeSMMo0A8zWcba7db1SydsH8l1Xl/d 5r7ZxxFX6ofRFbh2CI4jSZhwDAXvMIo6073HGh9bhYJjJ4FzVTiWr1t3k4x1l8sFORhu 7ZBQWueByODcdF0ZW4FWxCs5jyZLr6anM3ByVPtlTffeuVDCGw4aqg2U4y5iyYfbxwDg HdR81kHEoJ1YibQvmH0DNqTVZ1mndwDCoIv3eJn2+mnEdYAk2l2wclvYBF3YKCAUA2SR Qx+Pz9r3JCibCHNqSgzYyv2fqIrMJGn/9BFgi5v1ryQCEKKB0fjbXiKncFyr4j1VQ1cx PZng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=SCvxVucC; 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 m3si7106941ejq.184.2019.09.09.04.50.58; Mon, 09 Sep 2019 04:51:22 -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=SCvxVucC; 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 S1732168AbfIHMuf (ORCPT + 99 others); Sun, 8 Sep 2019 08:50:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:41332 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732119AbfIHMu2 (ORCPT ); Sun, 8 Sep 2019 08:50:28 -0400 Received: from localhost (unknown [62.28.240.114]) (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 D3E752190F; Sun, 8 Sep 2019 12:50:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1567947027; bh=t8vTz3bm7817MJk+R8f5YXtg/XCw3/+FCCFUyKitszE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SCvxVucCCWczsMl/hPhqMkeKhphExrOsuqT8oHI1suNXuJYHIRtcp+M2s+DwPf2p7 AnoMs9A1K7gI1iPCmB8NXT7EMcJIFjtduE5CNiM4M0PfkxCDq3hZo37xCg3hd8+U5+ CLG96OcY2eAY6RFWRttKjEBzarBet57nKdSw2yY8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Taehee Yoo , Andrew Bowers , Jeff Kirsher , "David S. Miller" , Sasha Levin Subject: [PATCH 5.2 33/94] ixgbe: fix possible deadlock in ixgbe_service_task() Date: Sun, 8 Sep 2019 13:41:29 +0100 Message-Id: <20190908121151.386928027@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190908121150.420989666@linuxfoundation.org> References: <20190908121150.420989666@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 [ Upstream commit 8b6381600d59871fbe44d36522272f961ab42410 ] ixgbe_service_task() calls unregister_netdev() under rtnl_lock(). But unregister_netdev() internally calls rtnl_lock(). So deadlock would occur. Fixes: 59dd45d550c5 ("ixgbe: firmware recovery mode") Signed-off-by: Taehee Yoo Tested-by: Andrew Bowers Signed-off-by: Jeff Kirsher Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index 57fd9ee6de665..f7c049559c1a5 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c @@ -7893,11 +7893,8 @@ static void ixgbe_service_task(struct work_struct *work) return; } if (ixgbe_check_fw_error(adapter)) { - if (!test_bit(__IXGBE_DOWN, &adapter->state)) { - rtnl_lock(); + if (!test_bit(__IXGBE_DOWN, &adapter->state)) unregister_netdev(adapter->netdev); - rtnl_unlock(); - } ixgbe_service_event_complete(adapter); return; } -- 2.20.1