Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp932717pxb; Wed, 6 Apr 2022 04:41:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwrNpPCNrybN0LyNsxTnm4mxJGSJRkk1TfqO7cVJasymH1oewvoSNqityrZqtrIMxOSphsw X-Received: by 2002:a17:902:ba83:b0:154:727e:5fc5 with SMTP id k3-20020a170902ba8300b00154727e5fc5mr8442493pls.55.1649245280861; Wed, 06 Apr 2022 04:41:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649245280; cv=none; d=google.com; s=arc-20160816; b=pA7H/kW6NoHg1DdFKglGVbjRkoLXB2JW11DBHNluwWiEAvcnknWBANc7aAeVwHSTpI zhF9JEZzYMvyb3GrVp9vQIhFdDg8emOp3hLXglkimvO9lUAZ+ycg+MHdSPhH42xtPCip 8wA/GkE2NCqiSKXeygYSSQdLYqHYv2520XmDFvolr8DedxRkwqykwSupyyYhZjwAxLFZ HwATGaVqP7hxC3k4wOslsCFP89bN7lOMJD0bqa0sY2hAmfSVwwqjTVTWANU1l19/7mSa 3cBEjWL3KJ6CU5FaQBIfynTE5AT8VjqBFs3t5Eshrh52uT+x/ssXmEfOmI0o0mgncsEg LXQg== 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=m8x005+tiGk399CwPFKzkG4gw4FgIEBPPg4j0fkSoGk=; b=FGXw2GUi7HXfF7CRo2Fbl/YN1KCzEmoO0Qug3NusWMUxLfYqDm4/dFXHOBceRPQz2U W8Shju+u6EH5DVmmSuq+crBN4v6vAe6JZ7hTCoXykylacmP+alAztBwi0CCImIjd5JcS TYajzqtNJV2kLJ/0VFUyrnALIlh08c+NjcyPyZ99YUJs0V2H+hprpTVEuPZP2+kOv9iA 5AQ8v54xF7xDmLaRPvj7lzsvKvx5cv86l7n4MQi5MHlFJtkhXtPrxmFE2Zi7kzxYhX0+ 7ygM5mitvMt2x593T4T4WSTCN7lacXiVDi/mVtbAgOX4eQziO1IcAHrVusVvwsDW689f 43CA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=kTps8JSK; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id i12-20020a17090332cc00b00154a3b5d927si16661548plr.512.2022.04.06.04.41.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 04:41:20 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=kTps8JSK; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D200E4E96DD; Wed, 6 Apr 2022 02:58:14 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1385874AbiDEMjM (ORCPT + 99 others); Tue, 5 Apr 2022 08:39:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236742AbiDEJDe (ORCPT ); Tue, 5 Apr 2022 05:03:34 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C12D1088; Tue, 5 Apr 2022 01:55:18 -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 ams.source.kernel.org (Postfix) with ESMTPS id CB163B81BAE; Tue, 5 Apr 2022 08:55:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 40090C385A1; Tue, 5 Apr 2022 08:55:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649148915; bh=H3ecDX8pEltqiGL2hkKufhyYiHFUlZgmKssDWrOOcHw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kTps8JSKf0zlICE5+PXhKUzI9VPAFDycNZ1j3ZIAqORTpWVr6V2rJ+lADolggfV7m /gAs4+Iljr6ULT1MSdbKq662sfSd837ERYrP8PDWQECiU7tACa4Sxo641J2OkxFlf/ BytBPRg1xWIigXZX48XF6Lqd/n9RWat8SNtR0EQI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Johannes Berg , Luca Coelho , Sasha Levin Subject: [PATCH 5.16 0510/1017] iwlwifi: mvm: align locking in D3 test debugfs Date: Tue, 5 Apr 2022 09:23:43 +0200 Message-Id: <20220405070409.438251687@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070354.155796697@linuxfoundation.org> References: <20220405070354.155796697@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=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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: Johannes Berg [ Upstream commit 59e1221f470c2e5d2f2d4c95153edd577a7071c5 ] Since commit a05829a7222e ("cfg80211: avoid holding the RTNL when calling the driver") we're not only holding the RTNL when going in and out of suspend, but also the wiphy->mtx. Add that to the D3 test debugfs in iwlwifi since it's required for various calls to mac80211. Fixes: a05829a7222e ("cfg80211: avoid holding the RTNL when calling the driver") Signed-off-by: Johannes Berg Fixes: a05829a7222e ("cfg80211: avoid holding the RTNL when calling the driver") Signed-off-by: Luca Coelho Link: https://lore.kernel.org/r/iwlwifi.20220129105618.fcec0204e162.Ib73bf787ab4d83581de20eb89b1f8dbfcaaad0e3@changeid Signed-off-by: Luca Coelho Signed-off-by: Sasha Levin --- drivers/net/wireless/intel/iwlwifi/mvm/d3.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c index a19f646a324f..75e9776001b8 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c @@ -2566,7 +2566,9 @@ static int iwl_mvm_d3_test_open(struct inode *inode, struct file *file) /* start pseudo D3 */ rtnl_lock(); + wiphy_lock(mvm->hw->wiphy); err = __iwl_mvm_suspend(mvm->hw, mvm->hw->wiphy->wowlan_config, true); + wiphy_unlock(mvm->hw->wiphy); rtnl_unlock(); if (err > 0) err = -EINVAL; @@ -2622,7 +2624,9 @@ static int iwl_mvm_d3_test_release(struct inode *inode, struct file *file) iwl_fw_dbg_read_d3_debug_data(&mvm->fwrt); rtnl_lock(); + wiphy_lock(mvm->hw->wiphy); __iwl_mvm_resume(mvm, true); + wiphy_unlock(mvm->hw->wiphy); rtnl_unlock(); iwl_mvm_resume_tcm(mvm); -- 2.34.1