Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp405934pxb; Thu, 12 Nov 2020 06:49:23 -0800 (PST) X-Google-Smtp-Source: ABdhPJzhMP4eUWgB8Ml21FNRem9HJVQ9NZ+T5eO/jdM75ztVTLhoOohQ7UTZ0joif8+on3Kd56U/ X-Received: by 2002:a17:906:37d2:: with SMTP id o18mr18261091ejc.379.1605192563251; Thu, 12 Nov 2020 06:49:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605192563; cv=none; d=google.com; s=arc-20160816; b=YPitbmErcTKOmmLoau4M5qF0jLpgLNyeR/0sGDsLsnqLfvjeYHrwEJ25MMY1azrfKD MpdU8IIpvuEOdbKCWPQ0X9eozAHIhnpf7M6eKMpLdxCjT1KeUFa8nzuPAPhlQHJRtB6I htHtrZJ4ryji1x/bZqWhW2lUNCdzYZj5tzZXKF5BrEsqHo1c/qlho8ycrhn4gEZ60Lyq cf9gwF+qsbEjCMYohIwjTqF7ImwXtjmPj9bD8of63dXYntBOdLxyEE2dEW1vgmOtQNdO LF0xDASvJfF+npn9xgffUXuXK1vHRXCA0NtV1Hhq8n/Gq17vLTGbDTmKhFD6LnVmGwre 1iOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from:ironport-sdr :ironport-sdr; bh=jCNpQlo5CQ8J8xHbbLmAe8kVqxVXDScgrVrwxu3Tf5Q=; b=0CCJm2O+JoGMyOZR+EEU1N9af0Z45w3+2BF4dYtmU2rUe2g22qjI7Kv3xowhQCUqBR CGYAQPF1zAPfSpKsWTfGFmwU01bSNt4dKdvQiEm6ILcQZZT8kT0aQaqU4Ek98oZxZDLb 19sOKUMhM6TJaTsEe4sXGkGrrfkBCxZrKqlqapR2yCE8utvZ1wJ+ArCR2bBk43SYWDD0 CA1lainBpRiemXSk1C9PDsiRQTMUeogPON6ZvcpEUHp2IRu+Y3+7OKRcHTSZOrNx2Hga bvG92gja0ahgy9X9cdu5L3Wy4CxuqmpXbPkEgdVj11SFdi2y+V8JuGCFvzmgmdqiTvLM udNA== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hr40si3483973ejc.353.2020.11.12.06.48.56; Thu, 12 Nov 2020 06:49:23 -0800 (PST) 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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728285AbgKLOq4 (ORCPT + 99 others); Thu, 12 Nov 2020 09:46:56 -0500 Received: from mga04.intel.com ([192.55.52.120]:7611 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727035AbgKLOq4 (ORCPT ); Thu, 12 Nov 2020 09:46:56 -0500 IronPort-SDR: 47AGfwby7pqgs741ZXuNwz4PKKFJZECacy4eNuIFMFjqWaXheCYgLR2MgXuW38XVDS1CNBvnHA DR4QBXJgC01Q== X-IronPort-AV: E=McAfee;i="6000,8403,9802"; a="167733312" X-IronPort-AV: E=Sophos;i="5.77,472,1596524400"; d="scan'208";a="167733312" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Nov 2020 06:46:49 -0800 IronPort-SDR: 7V223IaaLcQCP6ubSZGmGlFxIEdqv5gHZwMaWWRbbfsmwzTaJ4G6lYKc8huSCGztJzQIF3v6Yp BRlOkeYGO9fw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,472,1596524400"; d="scan'208";a="366356228" Received: from glass.png.intel.com ([172.30.181.98]) by FMSMGA003.fm.intel.com with ESMTP; 12 Nov 2020 06:46:45 -0800 From: Wong Vee Khee To: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S . Miller" , Jakub Kicinski , Maxime Coquelin Cc: netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Ong Boon Leong , Voon Wei Feng , Wong Vee Khee , Christophe ROULLIER Subject: [PATCH net 1/1] net: stmmac: Use rtnl_lock/unlock on netif_set_real_num_rx_queues() call Date: Thu, 12 Nov 2020 22:49:48 +0800 Message-Id: <20201112144948.3042-1-vee.khee.wong@intel.com> X-Mailer: git-send-email 2.17.0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix an issue where dump stack is printed on suspend resume flow due to netif_set_real_num_rx_queues() is not called with rtnl_lock held(). Fixes: 686cff3d7022 ("net: stmmac: Fix incorrect location to set real_num_rx|tx_queues") Reported-by: Christophe ROULLIER Tested-by: Christophe ROULLIER Cc: Alexandre TORGUE Reviewed-by: Ong Boon Leong Signed-off-by: Wong Vee Khee --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index ba855465a2db..33e280040000 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -5278,7 +5278,10 @@ int stmmac_resume(struct device *dev) stmmac_clear_descriptors(priv); + rtnl_lock(); stmmac_hw_setup(ndev, false); + rtnl_unlock(); + stmmac_init_coalesce(priv); stmmac_set_rx_mode(ndev); -- 2.17.0