Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp120978iof; Sun, 5 Jun 2022 23:00:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwMb2u/dK+UmpLROYrTr71S51WDbvO0X7Ao69hs7d97p+jilulfv9KY6q19x157L9zqJRSY X-Received: by 2002:a17:902:f552:b0:163:f64a:6154 with SMTP id h18-20020a170902f55200b00163f64a6154mr22790686plf.147.1654495236594; Sun, 05 Jun 2022 23:00:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654495236; cv=none; d=google.com; s=arc-20160816; b=kAl3iYAPAE7G5lkngc3zzpJYn8gQqM/ikrulNRZphtZXX5LvYavPxkkV2z7czHEVzU B9gezmDjJcmR+0s4H7EZsHernweveFvAqIINnGoQG+OAlQX6gr8PfcqcXFHDBddQCdAp a0i2JLlyZJ2tl1W+QBcmUsoR64CjvO/7ZGIyYp7FAYRZyDtPkXkto77N/1QztQNNFZtp EYEmZpPMkvqQSVnIPwGVTo2US1ATUsQbrbIFXD9JfyI5puVYR5s5H7U8xlYed+590/6w kOXBUICeC7kjKJZ++sJvGcvgGo9ReCcrOojY1aKdBdRmRPsBLBeoYNOLn35wjpil9WIS 7PTA== 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 :message-id:date:references:in-reply-to:subject:cc:to:from :dkim-signature; bh=kA1rE6coALLPyy9Pp2w6PONiCb6kJCX0DuutN6amvxU=; b=EOZ0cJZDl1RUl+3bEz8vlwpRL9sbOun4Ko/OlYwh+jfpF1rFcUBp+NURcOJJwIEe2Y HuIndTzZ9ImQW7AgZPC56L8oyV2S1ZMlqa07bXxs40SyvszhfZvlxb7+JPstpkuq2h5r bmIyUKJ/2UBvM+TfH2y4ergccLsS0p8Vb1ikAof94vq+tiS61sz9NISzs3o6Ght/aHgG +pWQIBJt0UpBUKC9bUKC2ArXxjaOsFWyfB7JSnrjm3OfWiDjvPkStFjeaUICkTm9opAj qK9R3LUdOmFRhPYaCaLrBJXBZr9/Gj4R4wPtgG4A0w/n+d93sUbslwfCmBgZW7ZFtxxu Gj8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=knL7dzbC; spf=softfail (google.com: domain of transitioning linux-wireless-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id p22-20020a1709027ed600b001637d6a52e8si24285043plb.19.2022.06.05.23.00.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Jun 2022 23:00:36 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-wireless-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=knL7dzbC; spf=softfail (google.com: domain of transitioning linux-wireless-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 33E4A2FC0DA; Sun, 5 Jun 2022 21:48:47 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346383AbiFERZa (ORCPT + 67 others); Sun, 5 Jun 2022 13:25:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38342 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232266AbiFERZ2 (ORCPT ); Sun, 5 Jun 2022 13:25:28 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68D4518344 for ; Sun, 5 Jun 2022 10:25:28 -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 020DB6114D for ; Sun, 5 Jun 2022 17:25:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2BBEFC385A5; Sun, 5 Jun 2022 17:25:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1654449927; bh=kA1rE6coALLPyy9Pp2w6PONiCb6kJCX0DuutN6amvxU=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=knL7dzbC2lKmFSVvKivkCTWvrtliUavnOD5Hc+D6/gMkH/bWiOwuFhu8MPqaiBAH6 NDEUq4XCGWib2Q3wqrVrjoOdz6r9ymlKzyL+FugdLzTyVjXezBKTizHMv0pSQlGyDQ eNLXmIpJKoUEogK+1KnclbCAwUT05OZNwGbMssTpqLpHy5tzchDxhgtBf1zgplAaxQ d7xBtPrANAm45BWN6uwEkSRHWXqNf/kf/4gC/1mFtKtNBOn56fmQXBQD1LOGsI7mRY 8j/jGX6kX1b+9eI0ituo+ygcX6XBK5Z/We3Y6rTXLCsSKgwooK8z3sA0ir9mFBZhg3 DBfZ/2IZZkZcg== Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000) id 6C129405523; Sun, 5 Jun 2022 19:23:37 +0200 (CEST) From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= To: Felix Fietkau , linux-wireless@vger.kernel.org Cc: johannes@sipsolutions.net Subject: Re: [PATCH] mac80211: do not wake queues on a vif that is being stopped In-Reply-To: <20220531190824.60019-1-nbd@nbd.name> References: <20220531190824.60019-1-nbd@nbd.name> X-Clacks-Overhead: GNU Terry Pratchett Date: Sun, 05 Jun 2022 19:23:37 +0200 Message-ID: <874k0zowh2.fsf@toke.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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-wireless@vger.kernel.org Felix Fietkau writes: > When a vif is being removed and sdata->bss is cleared, __ieee80211_wake_t= xqs > can still be called on it, which crashes as soon as sdata->bss is being > dereferenced. > To fix this properly, check for SDATA_STATE_RUNNING before waking queues, > and take the fq lock when setting it (to ensure that __ieee80211_wake_txqs > observes the change when running on a different CPU > > Signed-off-by: Felix Fietkau I think it's a little ugly to expand usage of fq.lock across more and more places, I don't really have a good alternative, so: Acked-by: Toke H=C3=B8iland-J=C3=B8rgensen