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 B218DC25B6E for ; Wed, 25 Oct 2023 10:39:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234602AbjJYKjw (ORCPT ); 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 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org 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