Received: by 2002:a17:90b:8d0:0:0:0:0 with SMTP id ds16csp4880133pjb; Mon, 27 Jul 2020 07:28:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxZLZ5iH8wqXpq7ml8RPqxERUki1LLdhHX/SIkwHpgmiE0yE0rnOSAcBzJ26MPwomXkja+X X-Received: by 2002:a17:906:4157:: with SMTP id l23mr5182006ejk.491.1595860112544; Mon, 27 Jul 2020 07:28:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595860112; cv=none; d=google.com; s=arc-20160816; b=eVnPcWHhChyiO3FHjJVcYOU1Zs3pb448QLVK9qxQZHl9m7wtus/9dqVSZYigUZznNM xEOZzU0Ivt4rB9A2sAtvW4Y0up2hulEMQUa4qD02p2G9drmMWFU2+bCgKf1A332EigUX Mr50o33cNM5GkO8hX646QTdHgv+T5A7xICqMN4ZBgtMbXjPJKa65I9dr5pItve0eBk5k 7kWULEGvVhrpXnAhv9GS2Ato9cbcFzLrEaOHlQesiUbk2NG5Fj9ZRDCYN41eAvBU59YI ekjitaIcpqsEsx3Q0J/Gxr2ozr/nxpu8G++EFv6xxYFuR+Y0DKgj5Przzrk87GXfmeB8 Ja7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=HYUoW1Y/x09rClPBglOO9i4uAqPO2RCrDPIvqmfurUc=; b=HbZeHt9Qa5UpyKR0B9gDltjSPDF6tMSO9bdpggBBzQ7Ws5y84a10s0JGxvB1XgMQ1v ZYUo/iv5GIBovI9EEjCTVgWasptf9gTCKnUioOO09GjnPa9gLSi4TpKHTPXvcT5rVt0y t06MVStG2PrzaHx56uuDmnKo7E3CB7uSJJSBjgXuj1b/H74a1kuIaXO8wNAe/pj0X586 Vw9xIOGyOucSMikNgUQQm4Z/WMzlTIZo86sOJujtorYdxnMh8aflsrysMxvTZu4I+z2A RdKJvbOXrCzg6AM6jRQ0AOrhc8csMHTaC03zU6yxL1BCloTOFroFh/gK3nGy8AOpGFhv hIRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=nmaz4fp7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l16si5405781edw.377.2020.07.27.07.28.10; Mon, 27 Jul 2020 07:28:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=nmaz4fp7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732327AbgG0OYu (ORCPT + 99 others); Mon, 27 Jul 2020 10:24:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:54510 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730619AbgG0OYt (ORCPT ); Mon, 27 Jul 2020 10:24:49 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CF361208E4; Mon, 27 Jul 2020 14:24:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595859889; bh=JfB1Zl1taTnjxsD1iQ0MHKt1q1YqdCcsz0pQJBK6fDE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nmaz4fp7xE4eKKnvNW3oP/FUjIyaRsOjcCO/u6lXu6SduUUuHJI/tEJXTBz8MnW9K aaXTRIbCXh6S4cL26/cc8Ml8W6rvMVyuqlOoYpjqrCYYN2wrO8XaehfaXMnT7hrY+F nFtFi8gML9afHGezD2OQuaHf4Sgm+42KJKYa8A10= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Johannes Berg , Luca Coelho , Kalle Valo Subject: [PATCH 5.7 144/179] iwlwifi: mvm: dont call iwl_mvm_free_inactive_queue() under RCU Date: Mon, 27 Jul 2020 16:05:19 +0200 Message-Id: <20200727134939.661424853@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200727134932.659499757@linuxfoundation.org> References: <20200727134932.659499757@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Johannes Berg commit fbb1461ad1d6eacca9beb69a2f3ce1b5398d399b upstream. 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 Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/iwlwifi.20200403112332.0f49448c133d.I17fd308bc4a9491859c9b112f4eb5d2c3fc18d7d@changeid Signed-off-by: Greg Kroah-Hartman --- drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) --- 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(stru 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; }