Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp157407pxv; Wed, 14 Jul 2021 00:36:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwffQhEPK7R2jTKaTlJZqn0qnyN7ku3Uz/v68WULcTN0sA7slXpSYnXfYdmxW+p3ZwpShLE X-Received: by 2002:a17:906:2583:: with SMTP id m3mr10519635ejb.506.1626248159977; Wed, 14 Jul 2021 00:35:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626248159; cv=none; d=google.com; s=arc-20160816; b=Hk46FI6/O7yJ8YXr7QPv3ewodpVriqNJM45kvS3FAlgywjP50cAyCOH9WqOqvyaFI3 v7iY0UuCmTr52TfDwzE0qJTt1LmXMlsHGQq/1hVWZc4v0NlR/rYt/EuP8K1mrg529H0s HB+9ZhKk03fHJAKvTT3zknm3iyJz1BQm1QkHNSFXbi4H1psKno9c0X1Yw0TiLs86ACZ6 EzV6SC5riLbHh/rPYulXweeyWLz2Qzrvnhv79mVKSWKAlTfwxHl+IUDv09HcrDOhk7f7 0RXVRiccxXFUkwn9FEp3aeEAjxp5hdhJ0xesSl5zt7u/aRe4rKxYAhVm2WU9JKT6YLBJ uRfQ== 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 :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=RG1iCBaT6E1VgpQV+JwxWmlLZlmtPr/DHuj0X5NRrws=; b=tmn9LDPVvBZYvoCwXqpYA7+8Qb1xazQG6uFT/dY80kzcSl26zRa54QKS/gYg77WeG5 +Nz4FHTDDhVyyIM1Afyr/9HnWsQsyd1qISAmZ1ZQZuLAEOpsiEUxAKO0I/Qcf4kr6qiq 0Jtn8rgJXVgTJoFCUKJDgDwQHHP63UkO/IfwyAGPQuUGuUCibMEyTsrWoQAlpW0y7F5c sv8RNyn72/pE9ITw6Z0DWk+3nBlfMAxoqFppahDwl4KCemH4VI74lcfmEm2b+3kdJr1v Ayd4vzfdjNd7863YVCB1MKrV54CCwJNbD36NJIB0krVxriBzAzoil2GDZ43D1rnvdIFD UKPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=EMH6028h; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m4si1805387eja.691.2021.07.14.00.35.27; Wed, 14 Jul 2021 00:35:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=EMH6028h; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238330AbhGNHek (ORCPT + 99 others); Wed, 14 Jul 2021 03:34:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238245AbhGNHej (ORCPT ); Wed, 14 Jul 2021 03:34:39 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1E10EC06175F for ; Wed, 14 Jul 2021 00:31:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: 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=RG1iCBaT6E1VgpQV+JwxWmlLZlmtPr/DHuj0X5NRrws=; t=1626247908; x=1627457508; b=EMH6028hJevw2RRnDbc8IdUH7buH2s02ecyEFZHITK8dUo7 +Ssu3pBBgkMcQaXvsCP6Ju4mOKJvh6NFNKjopVJR+8GUFYsjeg9EFpEtMtsqkLICXyn56uN6C7ib8 fJZ/jJ1Aye8F8MolUj7ySXrFiyOIhNJWPwmTbo6HKayGODGmms1g8XzN/B4xyJrRqBugzc+zXX6vs NGHm4U9z4pg5Qtpf0TZKa4nA7h8IpcMOK6HuVdez2rgiQc5aY+qKDBZzq87Hl8xa9iYqTjL8qxGfo Z4NM4nz93G2zbzkqSqY8VZ1W1Z7i5U8+lSixF4EpC8cfAe291XB81Hnek5xLg2Vg==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.94.2) (envelope-from ) id 1m3ZMo-0025w2-Pe; Wed, 14 Jul 2021 09:31:38 +0200 Message-ID: <59ca83f01601a47bf3cfaf38e85570b8a3c5c72a.camel@sipsolutions.net> Subject: Re: [PATCH 1/3] mt76 mt7915: take RCU read lock when calling ieee80211_bss_get_elem() From: Johannes Berg To: Ryder Lee , Felix Fietkau Cc: Lorenzo Bianconi , Shayne Chen , Evelyn Tsai , linux-wireless@vger.kernel.org, linux-mediatek@lists.infradead.org Date: Wed, 14 Jul 2021 09:31:37 +0200 In-Reply-To: <510ef14986079c731ea2879b3095831b60e4f648.1626240767.git.ryder.lee@mediatek.com> References: <510ef14986079c731ea2879b3095831b60e4f648.1626240767.git.ryder.lee@mediatek.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.38.4 (3.38.4-1.fc33) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-malware-bazaar: not-scanned Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Wed, 2021-07-14 at 13:36 +0800, Ryder Lee wrote: > >   if (!elem || elem->datalen < 10 || >   !(elem->data[10] & >   WLAN_EXT_CAPA10_OBSS_NARROW_BW_RU_TOLERANCE_SUPPORT)) >   data->tolerated = false; Unrelated to this patch, but that looks like an off-by-one? If datalen == 10, then you can only access data[0] through data[9], not data[10]? johannes