Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp2464176rda; Wed, 25 Oct 2023 03:39:55 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF6XylaYn3BTL2WzeoTn0IHahkKYx/uUuVwHggagKYg9YrfcM8grEABVq7rNbEDTrbH9oNb X-Received: by 2002:a05:620a:1b82:b0:76f:11d5:6532 with SMTP id dv2-20020a05620a1b8200b0076f11d56532mr13157645qkb.76.1698230395346; Wed, 25 Oct 2023 03:39:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698230395; cv=none; d=google.com; s=arc-20160816; b=P7madkAcMyLgCh4BIt6EpsMX8+5oe68QyYb+EUOSj6b2hvEwPxOabEqREszwH+YSMi sW15zh/yfoGmwl9OnSLtl9SxQlmrvOF1UXBxeW24qKd6PC2sMdm9G/D1x6So1VKx+fvc CnmBMNIcfrNERhBeugTSaG6Ujk5qd4fKjyo2AzLBs5yvc829Pf93b008KCaYquHHM4jH DZZIvaWn/IsKyHQPX911VAuqQr6Tme/rTCVrx4ZJbVNu9lNI9Xt5Jph7n+dGEMufNsdI GEA444YJLaFH0oC1gPIjvKtMdRbIZ0noUc0YTRsSyOmWgi38+BEcIWFgr6CkwGKDzA8w 9Y8A== 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 :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=VW/fA97JPE9q6x0GQ4oL1/8JOS/DJXZfjL7eN2JuLxo=; fh=ILDsIjGWIw8wNzSD9OkOo0mLajqnnAQb2JDfnmG92L0=; b=qEbSqQTc8KHVdWwH5Os6V6epikdg4jtuJRSPouqSi76Ouxf68Gf+5TxNpRqI+2IwT3 p2Udbq94OT3qgvzp3xqjT2JIP4/5K5kb+86XAVu7p97OG/HoxDRP4P0hX0RlMZNQnKzN TIsVk3tKC+sl+XDcl0mQOQhR73OpRE/NBLO6W/UoPUqQFHbidjKXG+Z0HlDZdDq8DoB5 xuVaViyQvODOe4WpgxklYbJCX9efRijlYX/OiMvRS6/whjsP6yvVck15AqJLxsYe1+8Q Vt0b+mNjFWQ4eoOG4mbO2RvXTPVLneL8urxxvWYAp81J4GEKrZCU1xF2AVoEWtxVinAo EpRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=ImIbLyJ9; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id g77-20020a0ddd50000000b0059f74659a2esi10809665ywe.56.2023.10.25.03.39.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 03:39:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=ImIbLyJ9; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id AC95180E6584; Wed, 25 Oct 2023 03:39:53 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234602AbjJYKjw (ORCPT + 52 others); Wed, 25 Oct 2023 06:39:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235023AbjJYKhf (ORCPT ); Wed, 25 Oct 2023 06:37:35 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:242:246e::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85ED41A5 for ; Wed, 25 Oct 2023 03:36:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=MIME-Version:Content-Transfer-Encoding: Content-Type:References:In-Reply-To:Date:Cc:To:From:Subject:Message-ID:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=VW/fA97JPE9q6x0GQ4oL1/8JOS/DJXZfjL7eN2JuLxo=; t=1698230193; x=1699439793; b=ImIbLyJ94H5GIZR8ipzc7sp6UeeWa5Hq/DEwvcuUJEpiZkJ U4HzCOHAnjcPBKB8IeRmc6FIxLeDfsQwNeMuKpMozjy5PO7qsmJpwnCmOAayqErDwWOKZ/dUy6wlZ reOVVfZ/Z9wONh3xE8Ucty7Exm9ZFD3X38IUqVj1ypcbtAQPoXdRtPgXAN2uVBfk/2ZlpzosR7Bhb N6RdNe1kl/h1KLWpc5AUaI8xpe9c4X+6Rx9a/arHZvEbZ59tgj/AzTUVV7rS0qDv6KtlqZqStLqkF p/zIdTYuPAZcj/WPk9OikaRGNECHUwCFv8QMtXm98pua7USWPwXX4Hq7mJ+k9VRA==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97-RC1) (envelope-from ) id 1qvbFR-00000002VNL-1jea; Wed, 25 Oct 2023 12:36:25 +0200 Message-ID: Subject: Re: [PATCH] wifi: cfg80211: fix bss rbn double erase issue From: Johannes Berg To: Jiazi Li , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: Jiazi Li , linux-wireless@vger.kernel.org Date: Wed, 25 Oct 2023 12:36:24 +0200 In-Reply-To: <20231025103304.22082-1-jiazi.li@transsion.com> References: <20231025103304.22082-1-jiazi.li@transsion.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.4 (3.48.4-1.fc38) MIME-Version: 1.0 X-malware-bazaar: not-scanned X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 25 Oct 2023 03:39:53 -0700 (PDT) Huh. On Wed, 2023-10-25 at 18:33 +0800, Jiazi Li wrote: > If cfg80211_update_assoc_bss_entry call rb_insert_bss re-insert bss > failed because cmp_bss return 0, >=20 Ok that's bad - so you hit the WARN_ON there? How that? We should fix that too? > this bss->rbn will continue to hold > expired data, such as __rd_parent_color. Does that matter in any way? > And this bss still in rdev->bss_list, maybe double erase in > __cfg80211_bss_expire later. > Double erase a rbtree node(with expired parent and color data) maybe > corrupt rbtree, so add a in_rbtree flag to fix this issue. This seems overly complex - couldn't we just remove it from the list too or something? It's already a case that "should never happen" so ... not sure we need to do something "good"? johannes