Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp1723788rwn; Thu, 15 Sep 2022 22:52:48 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6r8rHpczmTu7aL07d4CvQyebwpy3TLiq4E+FPgieaOCh8uHygWvEnkeTBO2VJtR3iaTccT X-Received: by 2002:a17:907:7205:b0:770:86f1:ae6e with SMTP id dr5-20020a170907720500b0077086f1ae6emr2430919ejc.396.1663307567975; Thu, 15 Sep 2022 22:52:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663307567; cv=none; d=google.com; s=arc-20160816; b=QsW7SOFMp+MkC1urH04iHB4ufbe6O9yTcmoPa7ZyJ5jVHbk3v/zh/VqNZ5EqqeUQ4p HOkuynlEsHHGcr60hGKMLTaK4KPzHOTiHtVYJNjIpfwS+ESTsHikHGnt7v4kXSEdS30u QDhuHlpW8ywyHi+c4V/URvpOFzVDgzcDckfYdLYSPCaYUn9CXRV75WH4QpWRXnoMTG13 PRAXJMqBUUBUe2WCNqKDqBcKlj4vzdkK+z2MZpcl6ekyZeKIRx9DzE3BSLBp6Zm/jL+Y O0heqcSj30NxgGVcKoQkH4lF3dJRKd2EjKJI+mUh+kjZ+klE8+AaQ1QtTFIG5mupoNHj PLnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:subject:cc:to:from:dkim-signature; bh=UccnSI0keLaXdQMDDAhLLZ1yWVCFifrC3htnYSmjaQU=; b=bxZEkz8RtiksXfW1pO5jbJcv+UnTriypPw8yVl5Tl7y1V1OOFxO3I8zk9sYBYZDZ6i 9jUn3/+B+hVc82zdEbRzIVWQlPC1KwWwP1qQyhX2JzWJ9KGpiAftai8W0TyDdMBBE/rh uKtk9dPwaWxXGLtjSIVSsnOY4P63M2SXx3Ae7PHqbCS9KPKmC4KKqvLxRZXoYusoQo1W GHu3pvUR/Qb/1DXUHYxcTXfmgIliiHBVaXkDdMvIpgr74LXzuyx3RB4+ds5nPkLOGD+X nq5AnHcZbskvB/YCSW2V6eUjCLf1ZLju/y0z3IONdmtG809X76ZCseilZDe9FvO0h/WW Vyqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Knu9u1kN; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id op25-20020a170906bcf900b0073146b3f95asi15609594ejb.632.2022.09.15.22.52.31; Thu, 15 Sep 2022 22:52:47 -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=pass header.i=@kernel.org header.s=k20201202 header.b=Knu9u1kN; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229967AbiIPFij (ORCPT + 64 others); Fri, 16 Sep 2022 01:38:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229964AbiIPFii (ORCPT ); Fri, 16 Sep 2022 01:38:38 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 480D471BD5; Thu, 15 Sep 2022 22:38:37 -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 ams.source.kernel.org (Postfix) with ESMTPS id 0E2C3B823AE; Fri, 16 Sep 2022 05:38:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A1C9DC433C1; Fri, 16 Sep 2022 05:38:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1663306714; bh=XjhJeM8qGrTfgtllNG60b4yqc1CpmpKRtgp6g86FThs=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=Knu9u1kNuImMnMOkFtkAMf06CxemF3MI2nB+BhrgdHRdnKM1k0T/099pJb0DjIaYK L6rN8XxhSdsI/t1z+v+tRAtRHQAzgu7vQTlTzClfaAasA7JGJHS26CNjp/yzLQ6xa/ BcnGRusk1onJFxaXf+IDV/BwKyDTdRQ23rrH8dz5K6ZucvKcjnpnfC2XGZKL7gKVXG djagtWO1UTYpxVPfheQg26wISqHOZ7Zl0AzxgdoocJtUZ0yD7sdpgIFfr0sfjBwFta hULmZErfIzZVPZTaHXCzGJRWXSetNUfGtj+xAIkMHSicrKBMLpfQgbIT6ZOhqB5tuB IgJ0qIdIdMcgg== From: Kalle Valo To: Alexander Wetzel Cc: linux-wireless@vger.kernel.org, Johannes Berg , Felix Fietkau , stable@vger.kernel.org Subject: Re: [PATCH] mac80211: Ensure vif queues are operational after start References: <20220915130946.302803-1-alexander@wetzel-home.de> Date: Fri, 16 Sep 2022 08:38:31 +0300 In-Reply-To: <20220915130946.302803-1-alexander@wetzel-home.de> (Alexander Wetzel's message of "Thu, 15 Sep 2022 15:09:46 +0200") Message-ID: <87y1ujanfs.fsf@kernel.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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 Alexander Wetzel writes: > 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 > --- > net/mac80211/util.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) The title is missing "wifi:", but no need to resend because of this. I assume Johannes will fix it during commit. -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches