Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2723548pxb; Thu, 11 Feb 2021 22:34:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJxqx59XffuFKGP7PDWQ2+ugMlT9iK8K5czLl9Av/N3+weuuJF246MhAbU5R46v2t535d7a9 X-Received: by 2002:a17:906:3285:: with SMTP id 5mr1559489ejw.356.1613111681100; Thu, 11 Feb 2021 22:34:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613111681; cv=none; d=google.com; s=arc-20160816; b=TlZDsRvnUcpIcrTClwMuZJcg0sFxvXnUc8VKdR6eUPwkFQi/DjH4QI3VThRG18KJEw buapMfncdIgC+jXeVlgNAb7Cn2QiwraC0midVrMER0GXKga4oXT5OEq/VSdtD0OyQtMK AauqT6vFNbNynY/TZ4eskxF4tFEC/dWCvKgjmTBpgl1HWTORl2omc8lWLuG4rWqcnEiq JU9hPWUHXgwHpPiuWIjt9OU6ym+qFIrPqw42G+AmBFFFzBEY7vbawZarkrQRtGAYHF31 B6dHjHQ/NWLnZP49fpwjehG+83//CILeZwYm1R5eRw7EeHye0b/7hqAlRjaEfzezITIn Lxig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=9OSaT3qldBbKb3aoRr6FNKO3CwIGmFcwDgn3c6dYxF4=; b=FffRrelM0sN4vxHcgB3XYNciCOrmuawPiizbpkdjaUKIbBU9Z3kbgZDuMzEKjTAhIu JzbnxGhxoGIQmmPd1xKEwQCkNNIimu2SgZxKQNBQObvuY9vOFkuHC6va5+8QnwZsAhCK YjLeKJpxlHj/mJVekWWv/wSJOJgi2G5RuPFM4NDcdyii6hDMfFU/DSJT7ViucLNnbv5n SsXBTNpLpxcPTXXmpRaF7dhw3cpMT2xk1/tTW9cCByiGtXCOmkKhgGGfKAJ4SXOK7YaI rm4DTm77TrLC9bZAZ3kdAfOFRGCMLbzPkvQD/o/AbhnX7Ni/oPkmgyYHfxF1OJEl2QOA gHQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=fML8A+g4; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 22si5687026ejc.181.2021.02.11.22.34.11; Thu, 11 Feb 2021 22:34:41 -0800 (PST) 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=fail header.i=@nbd.name header.s=20160729 header.b=fML8A+g4; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229718AbhBLGcR (ORCPT + 99 others); Fri, 12 Feb 2021 01:32:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48642 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229457AbhBLGcN (ORCPT ); Fri, 12 Feb 2021 01:32:13 -0500 Received: from nbd.name (nbd.name [IPv6:2a01:4f8:221:3d45::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED186C061574; Thu, 11 Feb 2021 22:31:32 -0800 (PST) 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: MIME-Version:Date:Message-ID:From:References:Cc:To:Subject: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=9OSaT3qldBbKb3aoRr6FNKO3CwIGmFcwDgn3c6dYxF4=; b=fML8A+g4vRFqphMSXB8XdVSB+v GgcQ0AJq1jwSjS+bHZPDrhsp9E3XR+TXtphYu1dZg79DWyXa9NzuyFGBp/NxHLHqkiWPKElLVSkdH JCGL9Xhx4t1sHK7doW+tUqYm9/wy/tl5yNuYhCSnRu4gU92JD8eCPR1UG6aVYq5BMDlA=; Received: from p4ff13c8d.dip0.t-ipconnect.de ([79.241.60.141] helo=nf.local) by ds12 with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1lARzF-0006iz-Jt; Fri, 12 Feb 2021 07:31:29 +0100 Subject: Re: [PATCH 1/2] ath9k: hold RCU lock when calling ieee80211_find_sta_by_ifaddr() To: Shuah Khan , kvalo@codeaurora.org, davem@davemloft.net, kuba@kernel.org Cc: ath9k-devel@qca.qualcomm.com, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <1cfa036227cfa9fdd04316c01e1d754f13a70d9e.1613090339.git.skhan@linuxfoundation.org> From: Felix Fietkau Message-ID: <00f1fb03-defc-89be-7629-69a0d9f659d4@nbd.name> Date: Fri, 12 Feb 2021 07:31:28 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: <1cfa036227cfa9fdd04316c01e1d754f13a70d9e.1613090339.git.skhan@linuxfoundation.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 2021-02-12 03:13, Shuah Khan wrote: > ieee80211_find_sta_by_ifaddr() must be called under the RCU lock and > the resulting pointer is only valid under RCU lock as well. > > Fix ath_tx_process_buffer() to hold RCU read lock before it calls > ieee80211_find_sta_by_ifaddr() and release it when the resulting > pointer is no longer needed. > > This problem was found while reviewing code to debug RCU warn from > ath10k_wmi_tlv_parse_peer_stats_info() and a subsequent manual audit > of other callers of ieee80211_find_sta_by_ifaddr() that don't hold > RCU read lock. > > Signed-off-by: Shuah Khan This patch seems unnecessary as well. All callers of ath_tx_process_buffer seem to hold the RCU read lock already. - Felix