Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1824030imm; Mon, 3 Sep 2018 10:22:33 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZ1b6m/vEujUjqk8Oe1YgNkqCdHyZcgsCAvlj3zVIU0dSFFbjy17WEVYy8VzDF8kgWoG7Ge X-Received: by 2002:a17:902:5a4e:: with SMTP id f14-v6mr24370366plm.311.1535995353527; Mon, 03 Sep 2018 10:22:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535995353; cv=none; d=google.com; s=arc-20160816; b=x1GJkKCKIPJl1mKiL9SSn86jfjAAiagBnx5NEvdRiwYPVKJC9frIb9V7teBDovKUdG ZSzetfAk/mXiLu9cXPuJXiNOJduIY8mJIeAN2DWjPRJAdr0dGJzxoSOlHWt1ucQMAFkl hFvlX1m7ee6Y6WuoBmnTUFDZdLY8QFZjCzytfP//wIN0Wp15xHRgsmY6MviMXHzDrOGt 8UIilmsFB+VsbGwKgp/cAikuZ7Mc2mLS+Grb+SCRHesG/FlGvFR4Z30jcNUw+5krryja 6QbfWEP0TfkNb1v7skC0zJ8bLhjUT9SPhmc/FWsZ+2OGwxVKSlG1d96wowrEcfgBcAJg 1eJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=ATyVA0fTzXkpZvAWJ/0J61eX5ZSe9KFbaRGGHKPdQIY=; b=riA1NIcwSM69ywoppupuRklYNXBt12FntmY/qVc467YzPjJvU9SBN5xSCk/yEbc0qN Pz/G5Tw1X1ZZptvajdNyK21PMln52AyMrUb7tti1h5/fCU11vigbn9iH+8FB/l7tqSr0 D8rJgeVszhf6mumtcAGcEWSCtA4cCoAoV5KZDzzk/sInFlZ9opcgGupxLzbyJW+oJgec ewSNlKXy7idTjXTJnOe8OVz6z19eDkPQLr0e+nHAFh13oeX2hA6WY+tkieaQcrxB6Ff9 iBS73JHsEt8PRgjWy9QRA7BKF8JyLTMKSKztiUXxpcZftFLquYgF7lXH5bURAwqCJSqn SPFQ== ARC-Authentication-Results: i=1; mx.google.com; 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 j61-v6si18246980plb.49.2018.09.03.10.22.18; Mon, 03 Sep 2018 10:22:33 -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; 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 S1730437AbeICVkF (ORCPT + 99 others); Mon, 3 Sep 2018 17:40:05 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:43156 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728036AbeICVkF (ORCPT ); Mon, 3 Sep 2018 17:40:05 -0400 Received: from localhost (ip-213-127-74-90.ip.prioritytelecom.net [213.127.74.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id D2D65D09; Mon, 3 Sep 2018 17:18:59 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Govindarajulu Varadarajan , "David S. Miller" , Sasha Levin Subject: [PATCH 4.14 071/165] enic: do not call enic_change_mtu in enic_probe Date: Mon, 3 Sep 2018 18:55:57 +0200 Message-Id: <20180903165658.654380672@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180903165655.003605184@linuxfoundation.org> References: <20180903165655.003605184@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Govindarajulu Varadarajan [ Upstream commit cb5c6568867325f9905e80c96531d963bec8e5ea ] In commit ab123fe071c9 ("enic: handle mtu change for vf properly") ASSERT_RTNL() is added to _enic_change_mtu() to prevent it from being called without rtnl held. enic_probe() calls enic_change_mtu() without rtnl held. At this point netdev is not registered yet. Remove call to enic_change_mtu and assign the mtu to netdev->mtu. Fixes: ab123fe071c9 ("enic: handle mtu change for vf properly") Signed-off-by: Govindarajulu Varadarajan Signed-off-by: David S. Miller Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/cisco/enic/enic_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/net/ethernet/cisco/enic/enic_main.c +++ b/drivers/net/ethernet/cisco/enic/enic_main.c @@ -2843,7 +2843,6 @@ static int enic_probe(struct pci_dev *pd */ enic->port_mtu = enic->config.mtu; - (void)enic_change_mtu(netdev, enic->port_mtu); err = enic_set_mac_addr(netdev, enic->mac_addr); if (err) { @@ -2930,6 +2929,7 @@ static int enic_probe(struct pci_dev *pd /* MTU range: 68 - 9000 */ netdev->min_mtu = ENIC_MIN_MTU; netdev->max_mtu = ENIC_MAX_MTU; + netdev->mtu = enic->port_mtu; err = register_netdev(netdev); if (err) {