From patchwork Thu Jun 9 05:54:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Koba Ko X-Patchwork-Id: 1641021 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=grI/iI1M; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LJYGW3V6Lz9s5V for ; Thu, 9 Jun 2022 15:55:13 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1nzB8G-00046n-4i; Thu, 09 Jun 2022 05:55:00 +0000 Received: from smtp-relay-internal-0.internal ([10.131.114.225] helo=smtp-relay-internal-0.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1nzB8E-00046V-Fe for kernel-team@lists.ubuntu.com; Thu, 09 Jun 2022 05:54:58 +0000 Received: from mail-pg1-f199.google.com (mail-pg1-f199.google.com [209.85.215.199]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 2C3263F1AC for ; Thu, 9 Jun 2022 05:54:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1654754098; bh=gU19c0lDQ8MZ2kzYtbXs/nzz5yZESLTzbdtmoXw2Ph4=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=grI/iI1MZKFd0qio1cMWzLuitBj2WqwTRcPGaj09Aq8SA3smb+XCXMf4RyNMjyF14 Mrh0Ck72TBKFx1mHV9TuyJLWmG26xo/VWUptr+vG6sW4zXqXg19rD404TxCbyjgjv8 Q8Zpq5eP4gE57+Ix+OBVAxJff0SEih0no6NT+7umWmvh7GQnC9C31ohjStNDRme+sK AkZZDLWZXoD3SxtRsgWS8nh1IoEh9wyOW8pkv+J5Qp+K53klKIy7720kXZCnFeUwNe oTqrLgnld0JqXYJ9hHeTEWTU9HxAUGxZu6hePyBI0rRCE+0YY/ZcL5MkqmpS+wJ3AT XHVGoA7LpF/JQ== Received: by mail-pg1-f199.google.com with SMTP id n6-20020a654886000000b003fda8768883so6140762pgs.14 for ; Wed, 08 Jun 2022 22:54:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=gU19c0lDQ8MZ2kzYtbXs/nzz5yZESLTzbdtmoXw2Ph4=; b=g9rSyRfFJarYfvwN0IhEZo1hI0tS+dgxiOlcxn1avF6NYi7/OOERdliyjZD2r0pUs0 qhRZOtdUtn4za/HHpyE+3S5Y2Hy/v7FXgiExd67AB3tl68TjL6ygC9EmDFGtXXkH61x5 5sdhVZTei8YlQ8eM5FcozTYe7mhGLHfCKFeM2NOYqq+tNjR7eYHhW6j/37LBgv07Dy8T kvQCGjRxUNvUsskJ01OOcvcUkta0WQ1iHJuC4pcnwHJv84/zERIUi1ZYht/mz4ALxg/L f3UglcR2VhZfyT3QVfl2Hl8jP9GP0JaKKE/+twImsZroCuu5FFFs5kAvBDENr5QStz+y v3IA== X-Gm-Message-State: AOAM530pf/ynhPMt/lb4HntN/8bLHhdGB75sWo4whFBWWJQauWsOe5+5 fAkGnfgxsnbQ+C79wL5HVFx5nQ13+accXOuutPcbVHJdKRc7s+7DSJKJ3jHDEyLSUnCI9M9TGwv VxhJ12uo2xGyEujL5gl6D9ZWfbl+SuBJP1FJ07OQTZQ== X-Received: by 2002:a63:7c4e:0:b0:380:8ae9:c975 with SMTP id l14-20020a637c4e000000b003808ae9c975mr33873502pgn.25.1654754096344; Wed, 08 Jun 2022 22:54:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzxgsYWBt+S2rwU8mmHl5LoTQmNodLUb4gbDLjPLYBqD7tx62/YfjrwX4hv0Xg0bX47e6mCrw== X-Received: by 2002:a63:7c4e:0:b0:380:8ae9:c975 with SMTP id l14-20020a637c4e000000b003808ae9c975mr33873473pgn.25.1654754095885; Wed, 08 Jun 2022 22:54:55 -0700 (PDT) Received: from canonical.com (2001-b011-3815-50ae-665b-c58f-4f9b-731b.dynamic-ip6.hinet.net. [2001:b011:3815:50ae:665b:c58f:4f9b:731b]) by smtp.gmail.com with ESMTPSA id l1-20020a17090aaa8100b001e08e6879c4sm15304766pjq.13.2022.06.08.22.54.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Jun 2022 22:54:55 -0700 (PDT) From: Koba Ko To: kernel-team@lists.ubuntu.com Subject: [PATCH 1/1][SRU][OEM-5.14] net: atlantic: always deep reset on pm op, fixing up my null deref regression Date: Thu, 9 Jun 2022 13:54:51 +0800 Message-Id: <20220609055451.1805026-2-koba.ko@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220609055451.1805026-1-koba.ko@canonical.com> References: <20220609055451.1805026-1-koba.ko@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Manuel Ullmann BugLink: https://bugs.launchpad.net/bugs/1978058 The impact of this regression is the same for resume that I saw on thaw: the kernel hangs and nothing except SysRq rebooting can be done. Fixes regression in commit cbe6c3a8f8f4 ("net: atlantic: invert deep par in pm functions, preventing null derefs"), where I disabled deep pm resets in suspend and resume, trying to make sense of the atl_resume_common() deep parameter in the first place. It turns out, that atlantic always has to deep reset on pm operations. Even though I expected that and tested resume, I screwed up by kexec-rebooting into an unpatched kernel, thus missing the breakage. This fixup obsoletes the deep parameter of atl_resume_common, but I leave the cleanup for the maintainers to post to mainline. Suspend and hibernation were successfully tested by the reporters. Fixes: cbe6c3a8f8f4 ("net: atlantic: invert deep par in pm functions, preventing null derefs") Link: https://lore.kernel.org/regressions/9-Ehc_xXSwdXcvZqKD5aSqsqeNj5Izco4MYEwnx5cySXVEc9-x_WC4C3kAoCqNTi-H38frroUK17iobNVnkLtW36V6VWGSQEOHXhmVMm5iQ=@protonmail.com/ Reported-by: Jordan Leppert Reported-by: Holger Hoffstaette Tested-by: Jordan Leppert Tested-by: Holger Hoffstaette CC: # 5.10+ Signed-off-by: Manuel Ullmann Link: https://lore.kernel.org/r/87bkw8dfmp.fsf@posteo.de Signed-off-by: Paolo Abeni (cherry picked from commit 1809c30b6e5a83a1de1435fe01aaa4de4d626a7c) Signed-off-by: Koba Ko --- drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c b/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c index bdfd462c74db9..fc5ea434a27c9 100644 --- a/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c +++ b/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c @@ -455,7 +455,7 @@ static int aq_pm_freeze(struct device *dev) static int aq_pm_suspend_poweroff(struct device *dev) { - return aq_suspend_common(dev, false); + return aq_suspend_common(dev, true); } static int aq_pm_thaw(struct device *dev) @@ -465,7 +465,7 @@ static int aq_pm_thaw(struct device *dev) static int aq_pm_resume_restore(struct device *dev) { - return atl_resume_common(dev, false); + return atl_resume_common(dev, true); } static const struct dev_pm_ops aq_pm_ops = {