Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp701205pxb; Tue, 5 Apr 2022 19:23:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxbzj3Lve2mTYbSq2aZhYtae0YLKF+tXWOKR8nzTzCkAsAed1/yBGY3Y/NX2SRr1mbq8DfS X-Received: by 2002:a17:90b:4d88:b0:1ca:a5c5:1386 with SMTP id oj8-20020a17090b4d8800b001caa5c51386mr7476802pjb.43.1649211811830; Tue, 05 Apr 2022 19:23:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649211811; cv=none; d=google.com; s=arc-20160816; b=WkQQ8k8vBjMIZLTgUObbIf+m+RgsPwoyzKF376AM6e27toHJxVo0sw67SyWP5fpMHz w4k6X3eI268JBYzQmkuD1qVS+Zeb7A6UnA3QHu2+qj6DJ9SiZ93Y73r+cHTtfL9DWqQt kF3R5GLJ/RaeTjZ2tJj6dO2Ba1BTRpqIUQjjZgA8ttFGPMp2jt5+gZZQcZnJGSVJ/ndc Ko2RIkfgh/myyxvYWvtvv5owqcD/lOpRGKeF9bm+kNy0Wi7PuxcTKggyUTNcDwgUaAZ9 e+8oNm57Pom7pcEEsF5vbeQeQZ743bgybmcXXXfQTSGqEmD+ck0Y6P+9IxvTLl2jZczQ AYAQ== 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=vtSdi+/hcV90HhUp/fFUe4MYFTCC1nzA7rIsOKjtgUs=; b=sdldvN6zylIgflMSk0nlhAuf3gPUYDuDbYkqb8jpnpjUXjrNgRe6kD1TOZ2YmoLsvo 796Vbw9HpCxe9oFcHDWiptfVIpAFTpnnBYNChJ0ZR3rn2FEEMi/MkOpPPmmKzSLXZ3Yv Icyn4/lPoTDGNfhUy6LpWXZZ+5NojRaCFo29rbyEq0vjgThWnHSeBwxKhWwPSzKhPpm4 T7Bc0T+d78nQMHxehc5Yn75gCKwA6fqY8FbA3S3r/VoaC1eIvHEnfow9o6GzU95HQfIE dvORdJWq17NEmdGecAdE5KjblMCHIfoSgHyIhzSWv7ho6ALjcM4SokEzTXY/vqUUSRu1 aG0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=z9NpW8Lj; 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 r29-20020a63fc5d000000b003816043f15esi14587614pgk.851.2022.04.05.19.23.18; Tue, 05 Apr 2022 19:23:31 -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=z9NpW8Lj; 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 S234765AbiDEI6E (ORCPT + 99 others); Tue, 5 Apr 2022 04:58:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37238 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236837AbiDEIRE (ORCPT ); Tue, 5 Apr 2022 04:17:04 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 222D8AF1C7; Tue, 5 Apr 2022 01:04:42 -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 2F761617D4; Tue, 5 Apr 2022 08:04:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3F492C385A0; Tue, 5 Apr 2022 08:04:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649145866; bh=twxBK/6R6dVTxHmZ166iGr8sl7qWopCJphQL1m4A06A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=z9NpW8LjDz3pcYIpmktpqJ+zVPRV9BPuLfhuv8tX3Gg70QvuwxUnpFLWmeFmAEh5C Qszt7zu60TInsFMAFO8NAhe35PinHvzKS3LuRve2lLurlhdL99xL9Kp9UUioQrDVJZ AVxNuHZT4G7Z6QoFHG1b0duiHSTdE5EqacXQKnFY= 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.17 0559/1126] iwlwifi: mvm: align locking in D3 test debugfs Date: Tue, 5 Apr 2022 09:21:46 +0200 Message-Id: <20220405070424.041684544@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070407.513532867@linuxfoundation.org> References: <20220405070407.513532867@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.1 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: 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 b400867e94f0..3f284836e707 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/d3.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/d3.c @@ -2704,7 +2704,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; @@ -2760,7 +2762,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