From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 48129C25B0F for ; Sat, 13 Aug 2022 17:18:35 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id BB9F440878; Sat, 13 Aug 2022 17:18:34 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org BB9F440878 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1660411114; bh=J1x9ZFwGyq7yz+KgoKgvnlqX6mKfyP/2cheEWYZHW1E=; h=From:To:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Cc:From; b=XPYybkpjzT5BYvqva0owfVGXRS+9ukswv7s/rTdzNWUM6p4GHCa7VJmex6l/euVs3 0w4/l4Y10uSq/0naf6pcilb1dJoiJUq3pFv7qcuthe2/dJpv9S6YJr1q7EBP/i64Rm a7QSmGsA/s3BNQ0r3RoY4c70wZF4eiVKg4PGn6bIe8v3WXDa5TlpvkKiOS8frRChLp 1p9xYPDN0GyL5bWB1Q5tZ7rrlkrUoCNo21UvZwICoToqc0aGRb86E+mbGohyHwSB/o 9xiajsJlhl4K7pZzE9zjU0S/6zzQwA3NmJ1FTfVrM9jpic/zYEZ3hcJH7RcBxN9uuL ozBHYyLWvGG8Q== X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lblTfPUMZoJH; Sat, 13 Aug 2022 17:18:33 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp4.osuosl.org (Postfix) with ESMTP id 7367241686; Sat, 13 Aug 2022 17:18:33 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 7367241686 Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 805741BF372 for ; Sat, 13 Aug 2022 17:18:32 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 5766B41686 for ; Sat, 13 Aug 2022 17:18:32 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 5766B41686 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HMkUWiqz2eAg for ; Sat, 13 Aug 2022 17:18:30 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org CA6C540878 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by smtp4.osuosl.org (Postfix) with ESMTPS id CA6C540878 for ; Sat, 13 Aug 2022 17:18:30 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id A610160F19; Sat, 13 Aug 2022 17:18:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9C487C433D6; Sat, 13 Aug 2022 17:18:27 +0000 (UTC) From: James Hogan To: Vinicius Costa Gomes Date: Sat, 13 Aug 2022 18:18:25 +0100 Message-ID: <2301866.ElGaqSPkdT@saruman> In-Reply-To: <87o7wpxb1m.fsf@intel.com> References: <20220811151342.19059-1-vinicius.gomes@intel.com> <4759452.31r3eYUQgx@saruman> <87o7wpxb1m.fsf@intel.com> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1660411109; bh=1p/xXDVLxA/uqY4ZM7s4TrkCpUzYZCj8oCu8kaTLTig=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=E2VXXi/8J0FbtmmYWTiqFxhp7oPW5gH3em4ypMWRTI7ZAvQbUK0p3xcXCFRj1W6Sl TZVZbZTk1SyUBo2FcVCrgT9uHgAMN8ihir+3/iZJkm+Xe1SDS+OF9z/o9xZzAx4U+0 CPIsg8y6txCbuG++luytPwAo1QFuk8AKCp4c3Tn3nFeAyv0SRxyp/m6s5RQmuBgJfn kn67iC4+WDuL+VIO8xWXRdekcw31A7BwxN16SkvEnlt/1eUaMjowHKThjkH1cCT4eR IsSYZO+ONWH9Cap1kRNS/j4L3l9Aus1KXZErLRFzaFhtBk0lzZ7g8E/syVToMWQ1li XVkruo9JIbE2Q== X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=E2VXXi/8 Subject: Re: [Intel-wired-lan] [WIP v2] igc: fix deadlock caused by taking RTNL in RPM resume path X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paul Menzel , netdev@vger.kernel.org, Jesse Brandeburg , Aleksandr Loktionov , intel-wired-lan@lists.osuosl.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" On Saturday, 13 August 2022 01:05:41 BST Vinicius Costa Gomes wrote: > James Hogan writes: > > On Thursday, 11 August 2022 21:25:24 BST Vinicius Costa Gomes wrote: > >> It was reported a RTNL deadlock in the igc driver that was causing > >> problems during suspend/resume. > >> > >> The solution is similar to commit ac8c58f5b535 ("igb: fix deadlock > >> caused by taking RTNL in RPM resume path"). > >> > >> Reported-by: James Hogan > >> Signed-off-by: Vinicius Costa Gomes > >> --- > >> Sorry for the noise earlier, my kernel config didn't have runtime PM > >> enabled. > > > > Thanks for looking into this. > > > > This is identical to the patch I've been running for the last week. The > > deadlock is avoided, however I now occasionally see an assertion from > > netif_set_real_num_tx_queues due to the lock not being taken in some cases > > via the runtime_resume path, and a suspicious rcu_dereference_protected() > > warning (presumably due to the same issue of the lock not being taken). > > See here for details: > > https://lore.kernel.org/netdev/4765029.31r3eYUQgx@saruman/ > > Oh, sorry. I missed the part that the rtnl assert splat was already > using similar/identical code to what I got/copied from igb. > > So what this seems to be telling us is that the "fix" from igb is only > hiding the issue, I suppose the patch just changes the assumption from "lock will never be held on runtime resume path" (incorrect, deadlock) to "lock will always be held on runtime resume path" (also incorrect, probably racy). > and we would need to remove the need for taking the > RTNL for the suspend/resume paths in igc and igb? (as someone else said > in that igb thread, iirc) (I'll defer to others on this. I'm pretty unfamiliar with networking code and this particular lock.) Cheers James _______________________________________________ Intel-wired-lan mailing list Intel-wired-lan@osuosl.org https://lists.osuosl.org/mailman/listinfo/intel-wired-lan