From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CC913C433E0 for ; Fri, 12 Feb 2021 17:21:38 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 81F6B64D79 for ; Fri, 12 Feb 2021 17:21:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 81F6B64D79 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=JMbUsfcwDI8bBV+vSkyghDnArPgzNLETqrsySngEhRY=; b=j4+jc7Wxw26xDYKKJB6ACvQc2 93aHiLSUoSxy0pVHamYn98zm2K+sshsnTdULZyEk6mW9WwoqvwzlA4xW57z/DGsayci+r7KSw7VRO MIm5oQaI8ds0VY1jWNQ/ZIarFygc/y9+Cde7V84/o7r6/JGAZf6AydMHr1OW1NXPfmoDga8T/8pL1 8GpYPw8IEndbYZAqxkwScW+BoV28bC0XkvTA+1TyCtr5ZNb0HRLvrjy3TpfZC932i2y4zmdgSbYCo SWt7AqPTcJS4pXWV91ru/XkQazkPJSwLCXK7+/09rF+NKaNcd/SvCjZBZdiWxFIRh+tvlrPsT9L0p dgdXLcPYQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lAc7O-0007O5-0R; Fri, 12 Feb 2021 17:20:34 +0000 Received: from mail-il1-x12c.google.com ([2607:f8b0:4864:20::12c]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lAc7L-0007N9-Ei for linux-arm-kernel@lists.infradead.org; Fri, 12 Feb 2021 17:20:32 +0000 Received: by mail-il1-x12c.google.com with SMTP id o7so8845599ils.2 for ; Fri, 12 Feb 2021 09:20:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=n9DaPQNZ9ApDhbjk3lpcweLqgl0plvUaf017MPEDmY4=; b=bH7T+IP0hxSM4qnABSsyIGH8bQIX8SeAq5MeI+UJbArLYzuYwzj4s+w0R6hYaioIv3 5l8j7hmD5TJxLVvpuP9gkfBDhs+RBXF6Esk6LyXnY2p0jkIUh3NI6cZMM2GEBxLC7yHF wWvueSO5T3GxMWuJGZN82vxNXh9J8KLIu3LUc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=n9DaPQNZ9ApDhbjk3lpcweLqgl0plvUaf017MPEDmY4=; b=A+ECTKzdLHTWyYa3IFxP2QmZpo6KQoBoYWQiVikpX6sw6xBS0Lgl2VYvgVwUrn/gJ3 HXY0AyIJaGHR377aKKQWRTRehjvKKYlzhxyps3HsYm4SOHHCkTsqBuzyvz0yI8864EnD cMqWQBSMtWECk1CoNi1BN0qo8QUTIhymMYhAD31O3YWNu+MUeWQyXJggBn5RNadJzw2i lJeoC3vir9RZXB9SW1CNdBKhZ5jqXea8N5T0dTmmHJr0zDMyIVgfkz4J6fN0TIbAN3IW ixxf92KSPdehRwVvmB/4iEP49z0oYP2qlI5/S6xv7DCy+fhMd6TRjVkFmyHgbriP65v7 4ZZg== X-Gm-Message-State: AOAM531FTw7lps29kjd5j6o3aWyzOsgrLmPBq8iDT1dksjlrqI+zuVlc LyrwhvI9H3t5nTcw97Cr77m9Tg== X-Google-Smtp-Source: ABdhPJy5u1pyxefeNefBUn+dDMHhvH9gQ1EoCBGDLyeSaQPbgvcoJetHzEOChfwu19Om76iN6cmLzQ== X-Received: by 2002:a92:b749:: with SMTP id c9mr2906435ilm.199.1613150429332; Fri, 12 Feb 2021 09:20:29 -0800 (PST) Received: from [192.168.1.112] (c-24-9-64-241.hsd1.co.comcast.net. [24.9.64.241]) by smtp.gmail.com with ESMTPSA id o131sm4632861ila.5.2021.02.12.09.20.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 12 Feb 2021 09:20:28 -0800 (PST) Subject: Re: [PATCH] mt76: hold RCU lock when calling ieee80211_find_sta_by_ifaddr() To: Felix Fietkau , lorenzo.bianconi83@gmail.com, ryder.lee@mediatek.com, kvalo@codeaurora.org, davem@davemloft.net, kuba@kernel.org, matthias.bgg@gmail.com References: <1cfa036227cfa9fdd04316c01e1d754f13a70d9e.1613090339.git.skhan@linuxfoundation.org> <20210212021312.40486-1-skhan@linuxfoundation.org> <3949e1fc-c050-73e0-d02f-63a25c4821ef@nbd.name> From: Shuah Khan Message-ID: <61994394-0d95-39eb-2a11-487ca7c6c37b@linuxfoundation.org> Date: Fri, 12 Feb 2021 10:20:27 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 MIME-Version: 1.0 In-Reply-To: <3949e1fc-c050-73e0-d02f-63a25c4821ef@nbd.name> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210212_122031_572156_9FB4FFF0 X-CRM114-Status: GOOD ( 13.55 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: netdev@vger.kernel.org, linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, Shuah Khan , linux-arm-kernel@lists.infradead.org Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2/11/21 10:36 PM, Felix Fietkau wrote: > > 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 mt76_check_sta() 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 > If I'm not mistaken, this patch is unnecessary. mt76_check_sta is only > called from mt76_rx_poll_complete, which itself is only called under RCU > lock. > Yes. You are right. I checked the caller of this routine and didn't go further up. :) thanks, -- Shuah _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel