From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 25F0BC38A2F for ; Fri, 17 Apr 2020 06:42:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 066D5221EA for ; Fri, 17 Apr 2020 06:42:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728266AbgDQGmE (ORCPT ); Fri, 17 Apr 2020 02:42:04 -0400 Received: from paleale.coelho.fi ([176.9.41.70]:56350 "EHLO farmhouse.coelho.fi" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728248AbgDQGmD (ORCPT ); Fri, 17 Apr 2020 02:42:03 -0400 Received: from 91-156-6-193.elisa-laajakaista.fi ([91.156.6.193] helo=redipa) by farmhouse.coelho.fi with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1jPKhN-000KMG-AC; Fri, 17 Apr 2020 09:42:01 +0300 Message-ID: <1c6acee636c0463c4c293ff910053f8b25b4da92.camel@coelho.fi> From: Luca Coelho To: Mark Asselstine Cc: kvalo@codeaurora.org, linux-wireless , johannes.berg@intel.com Date: Fri, 17 Apr 2020 09:42:00 +0300 In-Reply-To: References: <20200403082955.1126339-1-luca@coelho.fi> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.0-1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [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 On Fri, 2020-04-03 at 10:28 -0400, Mark Asselstine wrote: > I was looking into this as part of > https://bugzilla.kernel.org/show_bug.cgi?id=206971 and had a similar > fix in flight. My concern was that queue_owner being used outside of > the RCU might be an issue as now you have no guaranty that the > eventual use of sta->txq[tid] in iwl_mvm_free_inactive_queue() is > going to be valid. The only way to work around this is instead of > storing queue_owner, store mvmtxq = iwl_mvm_txq_from_tid(sta, i), then > adjust iwl_mvm_free_inactive_queue(), iwl_mvm_disable_txq() and > whatnot to take struct iwl_mvm_txq * instead of struct ieee80211_sta > *. If you open the bug you will see the latest version of my work as > the attached patch. I am not an RCU expert so I am curious to hear > your thoughts. I asked Johannes to check your comment. For now, I'm going to drop it from v2 of this patchset, so we can go ahead with the other patches. -- Cheers, Luca.