From patchwork Thu Nov 12 14:49:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wong, Vee Khee" X-Patchwork-Id: 11900435 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 811EFC2D0A3 for ; Thu, 12 Nov 2020 14:47:33 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CBA5220872 for ; Thu, 12 Nov 2020 14:47:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="GveqzhUa" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CBA5220872 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Owner; bh=NpsF81e8NSKhlVd5uJGhnfWS+m5U2lo3Y0/V9/BbSGA=; b=GveqzhUaFEIjnaPjCle1+t5EEu N6Z52nVZQbCqCJq/r+aEf/YJkODvDyD1o6+QlIhgWuJD0AQICh7fi7No7nKyDls5pU8nz5oGd7TWg lh3Nqg3MZtpSu1/6HRJ9Oj3CZigEf2TEI4qPBaXvLTOfJ88iXKyP/6kJv3BsxX8vTlIVUsYYXt9S8 KZvBYl2b6Gi9zaPxhqOXBR2xdLRHLP3x1tfLjN8gqnKaafeWEwxyRIG4dQHuXac1FR+m+/jEG67DU zzrsQvRwpFCyPmwnbgqB0th6lh9A6WD67wew9FaivVvIANK/cmWJ6jCAnnlR3+rMrLUQkuOZrNRxs M2Cvy6ZQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kdDsP-0006Kj-PA; Thu, 12 Nov 2020 14:47:05 +0000 Received: from mga07.intel.com ([134.134.136.100]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kdDsM-0006J0-Rz for linux-arm-kernel@lists.infradead.org; Thu, 12 Nov 2020 14:47:03 +0000 IronPort-SDR: ojXNIlkvFOpc51uLiqENWkBwuc9nKsfu9o+wL4IQZqhWmt3jv2WISDcY13JHPjs0I1D2Xwm0gV G1X45zAOm6mg== X-IronPort-AV: E=McAfee;i="6000,8403,9802"; a="234479433" X-IronPort-AV: E=Sophos;i="5.77,472,1596524400"; d="scan'208";a="234479433" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga105.jf.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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201112_094703_047107_CABCE8DC X-CRM114-Status: GOOD ( 12.39 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Voon Wei Feng , Wong Vee Khee , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Christophe ROULLIER , Ong Boon Leong , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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);