Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp234019ybb; Fri, 3 Apr 2020 01:31:32 -0700 (PDT) X-Google-Smtp-Source: APiQypIqpbIxMvBMzkb05tOznE5q1f0OnH6rhH6WbiF4XK8CYSC25+CDLOSlQQHLbKcMscNY6STT X-Received: by 2002:a4a:a60a:: with SMTP id e10mr5902383oom.34.1585902692069; Fri, 03 Apr 2020 01:31:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585902692; cv=none; d=google.com; s=arc-20160816; b=VX4g6KMYBLCyUegavGipLM8KnpLGe4semosi8YCD3FsTzEaT0i8iaKbbafLOKuE+aK BxTLVgIDGJdYE1FhRuit+UbxGCSyjswg6/0ohUynbXOtSs2YTn65r/evNYBLJXq9fXR6 lLO5SVjh8dzmu1iMjGMg3Nwc+ExM3h3/oEMM9ZGkXs4y73U7+wd/LHtQ63qhSGG2oUKk FV39HhzsjpkRsi7hJvt+C6zPkoS1ZBXKZIjLLIIqUtWdKsjtIhhu9VrV0RQO4imSl0mk 997Qurl4l+w/nZFG8AzdkMcUNMRPgG8S5V73aaVki75Mq4w9Ru1iIERaodem820HhuFi DvZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:cc:to:from; bh=BRdclT0UMqw2VNPZH0tytkGz4feIy9VBvgAPIxRFDEE=; b=UA7nFYlVetLmL1JGsxx2Sqqlvm0Ovji0C/zNXHk2Rah6N4EEM+rOSsle1E+BLjCIDc I71dBm4PiSKnuW8143vzsth0bFEJqZiRuJnMMT2BU4Jjzvj2rwFzThT6jZJgoKlHYhPc SSSMyfMVTzhWO9X4UH1Zv1NLXzb4RaKoklvHkKejD51QaGJYW0d26YF0vVOYwEKkaVxi UJmWG2qCq9mQLyx9dV7GD7fzjC3RKwa0lAnYpWmgb3CSOw11AEOYIDd0ajihZqqhXenV miYU6zTL3qRadnY+LiHB93Oo6pdv+j0M5uL3q2j4riZn7mA5DKzd3dOaiEENMNNWtEvz JSsA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s70si3520533oos.6.2020.04.03.01.31.20; Fri, 03 Apr 2020 01:31:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390478AbgDCIaN (ORCPT + 99 others); Fri, 3 Apr 2020 04:30:13 -0400 Received: from paleale.coelho.fi ([176.9.41.70]:45484 "EHLO farmhouse.coelho.fi" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2390431AbgDCIaM (ORCPT ); Fri, 3 Apr 2020 04:30:12 -0400 Received: from 91-156-6-193.elisa-laajakaista.fi ([91.156.6.193] helo=redipa.ger.corp.intel.com) by farmhouse.coelho.fi with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1jKHiL-0008yu-DB; Fri, 03 Apr 2020 11:30:10 +0300 From: Luca Coelho To: kvalo@codeaurora.org Cc: linux-wireless@vger.kernel.org Date: Fri, 3 Apr 2020 11:29:55 +0300 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200403082955.1126339-1-luca@coelho.fi> References: <20200403082955.1126339-1-luca@coelho.fi> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on farmhouse.coelho.fi X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, TVD_RCVD_IP autolearn=ham autolearn_force=no version=3.4.4 Subject: [PATCH v5.7 8/8] iwlwifi: mvm: don't call iwl_mvm_free_inactive_queue() under RCU Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Johannes Berg iwl_mvm_free_inactive_queue() will sleep in synchronize_net() under some circumstances, so don't call it under RCU. There doesn't appear to be a need for RCU protection around this particular call. Cc: stable@vger.kernel.org # v5.4+ Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c index 56ae72debb96..9ca433fdf634 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c @@ -1184,17 +1184,15 @@ static int iwl_mvm_inactivity_check(struct iwl_mvm *mvm, u8 alloc_for_sta) for_each_set_bit(i, &changetid_queues, IWL_MAX_HW_QUEUES) iwl_mvm_change_queue_tid(mvm, i); + rcu_read_unlock(); + if (free_queue >= 0 && alloc_for_sta != IWL_MVM_INVALID_STA) { ret = iwl_mvm_free_inactive_queue(mvm, free_queue, queue_owner, alloc_for_sta); - if (ret) { - rcu_read_unlock(); + if (ret) return ret; - } } - rcu_read_unlock(); - return free_queue; } -- 2.25.1