Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp1030651rwn; Thu, 15 Sep 2022 09:25:42 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4u/mi6IYgcg6OZ2z52z17YfMUqwc3SWCzcA2aov4i1TrHkTF61TQiLJO6pGc9qAp2KX00b X-Received: by 2002:a63:4c5f:0:b0:439:49b4:809f with SMTP id m31-20020a634c5f000000b0043949b4809fmr556002pgl.382.1663259142054; Thu, 15 Sep 2022 09:25:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663259142; cv=none; d=google.com; s=arc-20160816; b=TSKtGhS04aTPjc0MYjZ2fEscqRRnoijpusq3w4lHmMSKye4x6um4RgEqA3iaYtOR1n jqIi+6tgtZ/BW9I/H3aFtAllbRsQ2YgURGTyVw7g+9HvJSn42lFTkNeCEEqR6riIbtLG sBhiXs4gC9gOwejC4X30BOmkFQBpVMdvLhjn3zybPSt/pBmNmcGJmB/bhkyaQvCAvBcn So9fPWspKk5RGVusRi8VOy6tcn2Air5QpcdpAjz0F5JQNtEuEfazp8eu/hhmJYP+YyvV Beulow55BKmtaUM4fduMBAkemREdtt+CY4u6q+WaPwvew06n9caojQ983zG8P0HW6xly PcQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=yWtNuX2Y0yBQx1BHAgJFSA4C6O6ZJieQhQeChGx86FI=; b=QysXBG/K5jN0izTvFZYjlfU8gpY13/ZuXOvHGOpWsDkP9Wj0MsF5fyYY12NB2iplMH t7f1O1khUKwuir/hQbcXEbDJ3GUUUnIvVOh5R9qm0n/fSzzeTzC72WhCLCAyyvO6306C FQh3kHAkoWdqvns2gjinlpGiUuyFd/bNfK6nxFkfQmIkl7ixZWAun2PxBwaT1yIwkh4I 9FNrx3CZWNNgQLdb6reg+GgcBiuJGfqk6UVdquLD4c5eeQ/cyxr01TYOonpD9PbsAn7x 7kEPkBisIopsL8JIKDD0lZJBeJNJSpTqrIHmpowEMXJjlgZJd/xE/yP+TqKnC7I5X9Z2 c9LA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=BwJ1eula; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nbd.name Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i1-20020a17090aee8100b00200934a5a53si17456917pjz.29.2022.09.15.09.25.25; Thu, 15 Sep 2022 09:25:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=BwJ1eula; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nbd.name Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229954AbiIOQTD (ORCPT + 64 others); Thu, 15 Sep 2022 12:19:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230009AbiIOQSn (ORCPT ); Thu, 15 Sep 2022 12:18:43 -0400 Received: from nbd.name (nbd.name [46.4.11.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C4309CCC8 for ; Thu, 15 Sep 2022 09:18:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:From: References:Cc:To:Subject:MIME-Version:Date:Message-ID:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=yWtNuX2Y0yBQx1BHAgJFSA4C6O6ZJieQhQeChGx86FI=; b=BwJ1eula1pWL7NUV3f/CYhb20r Ox0N6sTqzupX1dXzJFJ8Yd1gqG4AVAJBaKq35LlXN3tDbTw4VmCs4HAhpPEgCemsd3V5WmmExAmsl v0Hc/6tZ/frqSyf+M3cbJTSCs0iLGbill0YXjIdvRksRToOh7dHbiAmK9c/ozLNEQL0A=; Received: from p200300daa7301d00b82a348903aff2a7.dip0.t-ipconnect.de ([2003:da:a730:1d00:b82a:3489:3af:f2a7] helo=nf.local) by ds12 with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1oYrZY-005BaH-3E; Thu, 15 Sep 2022 18:18:40 +0200 Message-ID: <26e9ae91-8e13-df45-815c-cb45c1911032@nbd.name> Date: Thu, 15 Sep 2022 18:18:39 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.13.0 Subject: Re: [PATCH] mac80211: Ensure vif queues are operational after start Content-Language: en-US To: Alexander Wetzel , linux-wireless@vger.kernel.org Cc: Johannes Berg References: <20220915130946.302803-1-alexander@wetzel-home.de> From: Felix Fietkau In-Reply-To: <20220915130946.302803-1-alexander@wetzel-home.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_NONE, SPF_NONE autolearn=ham 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 On 15.09.22 15:09, Alexander Wetzel wrote: > Make sure local->queue_stop_reasons and vif.txqs_stopped stay in sync. > > When a new vif is created the queues may end up in an inconsistent state > and be inoperable: > Communication not using iTXQ will work, allowing to e.g. complete the > association. But the 4-way handshake will time out. The sta will not > send out any skbs queued in iTXQs. > > All normal attempts to start the queues will fail when reaching this > state. > local->queue_stop_reasons will have marked all queues as operational but > vif.txqs_stopped will still be set, creating an inconsistent internal > state. > > In reality this seems to be race between the mac80211 function > ieee80211_do_open() setting SDATA_STATE_RUNNING and the wake_txqs_tasklet: > Depending on the driver and the timing the queues may end up to be > operational or not. > > Cc: stable@vger.kernel.org > Fixes: f856373e2f31 ("wifi: mac80211: do not wake queues on a vif that is being stopped") > Signed-off-by: Alexander Wetzel Acked-by: Felix Fietkau Thanks for figuring this one out, - Felix