Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp3279751iob; Mon, 16 May 2022 18:00:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJze1DuIaZOPAuEiB8vpcyR+MOL5cKT9drR/I347wIS7DfaMkj0QYP97dDMxlKTDtm+iw4ub X-Received: by 2002:a05:6402:5190:b0:427:df4a:19d9 with SMTP id q16-20020a056402519000b00427df4a19d9mr16347853edd.384.1652749233992; Mon, 16 May 2022 18:00:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652749233; cv=none; d=google.com; s=arc-20160816; b=YlXf++5/lNAaTR8fEmNxqZRGXfL2dH6N7WMAoPW073C+UrDK/TsBePTFSAGMGMwuMO si0FJ3sDnxKzGsxvBbKNeVdqus60Ij44qXk0NbnBBzq58XSnAgtxkTBkf8JthLEU57xW 1hZvYFuFk7pzRxGlAIUrBixBy4+xkzNT9ZRGDlaT2b4G6YzUFGxk6MvgXYaX5eoq4zYN k39Qq8lhlbdG5Z8H7pq0xpyqPgYIVC6Et7yoc4jfAzQtzZ9pY8Amv4W6EZp2tVK7YtlP e0iMY+fLbFZ/43eOWeEgZUwKJsa5VJJeM+YYvqot4/lLNzSIYPrQZRV49/79YSRjEw37 hhxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=iCQ8pOn/Hu7zeGNV6k0PdPxQ5t22h0YFthgcFXAhIW4=; b=ntLNHIilApJZz9jiavtqROY+4KQnlS6HuCuoalktCgiHD5K20MsyxLgfMife+Nk8cj 2Zxj5DBOl8ZhIrcXNSeq16B78ibGBxDCQAvqgwSoiCUsVETccAsQ0KvNbVHWIAi21aaM fOFGGxbhLMDeM1ZPrfV+uqtn/E5wdIR1Rp5fbs3wfuLpzfnMKEzfiCI1WnYhoVJl157T KzcstA/EBBxjsJzMJEMXEZDzoXpCPMaDLsZfsvobPGZ8zmx1Ce8foRUWq2cyvaM1FS3V UaiTsdS0IO6vPtN95VDQXJmjVyYUdEv0UsapLoJ6LukX42Olxrd56IufrUYErZ5qifOk hi8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=bAuRSHzZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e22-20020a17090658d600b006e8c1be7b7asi1472898ejs.274.2022.05.16.18.00.08; Mon, 16 May 2022 18:00:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=bAuRSHzZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345856AbiEPUTS (ORCPT + 99 others); Mon, 16 May 2022 16:19:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43274 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348885AbiEPT7C (ORCPT ); Mon, 16 May 2022 15:59:02 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1BEF28A; Mon, 16 May 2022 12:52:02 -0700 (PDT) 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 675FE60ABE; Mon, 16 May 2022 19:52:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 774ABC385AA; Mon, 16 May 2022 19:52:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1652730721; bh=YMYJCd01UUyE8kNd9wRP9+bD6BDn8c+cckoyvOVsVpI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bAuRSHzZqi+QZy8klubCdQdAgMnnOdtfe9YuDYY2GJWEtYNrdLhPO7vx7tliTlj3Y RmqKGGJjFha8qigNeX4enNtlSDhqaKAmR/cn61zweMvesqcxm/LZLDR1OkpJdXE5iw spTZXT6oZqxo8IF9zOnP4umbJuGvzu+21mnQYpZo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jordan Leppert , Holger Hoffstaette , Manuel Ullmann , Paolo Abeni Subject: [PATCH 5.15 087/102] net: atlantic: always deep reset on pm op, fixing up my null deref regression Date: Mon, 16 May 2022 21:37:01 +0200 Message-Id: <20220516193626.493442041@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220516193623.989270214@linuxfoundation.org> References: <20220516193623.989270214@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Manuel Ullmann commit 1809c30b6e5a83a1de1435fe01aaa4de4d626a7c upstream. 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 Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c +++ b/drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c @@ -449,7 +449,7 @@ static int aq_pm_freeze(struct device *d 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) @@ -459,7 +459,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 = {