Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C64FBC433EF for ; Tue, 30 Nov 2021 11:12:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237272AbhK3LQH (ORCPT ); Tue, 30 Nov 2021 06:16:07 -0500 Received: from paleale.coelho.fi ([176.9.41.70]:49972 "EHLO farmhouse.coelho.fi" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S232559AbhK3LQG (ORCPT ); Tue, 30 Nov 2021 06:16:06 -0500 Received: from 91-156-5-105.elisa-laajakaista.fi ([91.156.5.105] helo=[192.168.100.150]) by farmhouse.coelho.fi with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ms13t-0013Xk-Ve; Tue, 30 Nov 2021 13:12:39 +0200 Message-ID: From: Luca Coelho To: Toke =?ISO-8859-1?Q?H=F8iland-J=F8rgensen?= , johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org Date: Tue, 30 Nov 2021 13:12:34 +0200 In-Reply-To: <8735nf9ieg.fsf@toke.dk> References: <20211129133248.83829-1-luca@coelho.fi> <8735nf9ieg.fsf@toke.dk> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.1-1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Re: [PATCH 15/16] mac80211: agg-tx: don't schedule_and_wake_txq() under sta->lock Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Mon, 2021-11-29 at 14:54 +0100, Toke Høiland-Jørgensen wrote: > Luca Coelho writes: > > > From: Johannes Berg > > > > When we call ieee80211_agg_start_txq(), that will in turn call > > schedule_and_wake_txq(). Called from ieee80211_stop_tx_ba_cb() > > this is done under sta->lock, which leads to certain circular > > lock dependencies, as reported by Chris Murphy: > > https://lore.kernel.org/r/CAJCQCtSXJ5qA4bqSPY=oLRMbv-irihVvP7A2uGutEbXQVkoNaw@mail.gmail.com > > > > In general, ieee80211_agg_start_txq() is usually not called > > with sta->lock held, only in this one place. But it's always > > called with sta->ampdu_mlme.mtx held, and that's therefore > > clearly sufficient. > > > > Change ieee80211_stop_tx_ba_cb() to also call it without the > > sta->lock held, by factoring it out of ieee80211_remove_tid_tx() > > (which is only called in this one place). > > > > This breaks the locking chain and makes it less likely that > > we'll have similar locking chain problems in the future. > > > > Reported-by: Chris Murphy > > Signed-off-by: Johannes Berg > > Signed-off-by: Luca Coelho > > Does this need a fixes: tag? Hi Toke, Neither Johannes nor Chris pointed to any specific patch that this commit is fixing. If you know the exact commit that broke this, I can add the tag and send v2. Thanks! -- Cheers, Luca.