Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1442005pxb; Wed, 10 Feb 2021 08:25:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJzu+wKaGqqez0uU0Tf33iibwg1u3YxYWyaafSzhmA2Z+PhK5IEQps8gggGMGaMYHlth4w+S X-Received: by 2002:a05:6402:38d:: with SMTP id o13mr3809740edv.155.1612974350726; Wed, 10 Feb 2021 08:25:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612974350; cv=none; d=google.com; s=arc-20160816; b=dCCcqcXyWudQPdQypYgHqDlHHYBHiw4xfStuqchLvAmR9+zPf+D5r297Fw0eu94t2+ 2jusemqsGViZZ3q6bZLCgL3zxNpLsNpC0qjDp8Ju+NO260v2ZAvJUGABB/MOzWvKFMYe wC+7PhsEwNxq9+nGPLxCk53GG0WtC+G4gB21Rj32/qD9bZKxozvB1IABV8CFlw0OYexB 4XDe9HBpK1/GLbsNCIyl/T2aXfukFs+L36/qTQWlF1Gadji4DKfwi1o4gm8VS9AMgG8X PvOGjwaJergDlv/+J/YUB2tfxws0c2yl4rbFpzbZZptBFEYW6g9P1a179GUyLoe9k1lj hoVQ== 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=JSh8ExYxdty8HZ11KujafrMp7iovLQF4x5Wy4WPKtFY=; b=N1zqR7KAF8FdVJSFWYFCpRhc5wlENY/5pQw1U42KCaU9WMrW0BhEs/WnBvatW4+hqu 0XqEch0FVqQokhj0hYBmybckgsa+8eVtcNpm+d4Gw63wkIQh2HV648KYB+7lCpssG/nq J262VIcRs9XLvK7wzdZSodCDF7fFIGnQrpOrrFKW6bc4zr7kFrYPh6UmwYou6Eb9znfa QIquwiJ2OieqWgZt1KdsORpAbOb7djuvNCTR/w3CKBoJ0Kw40ic5gQsfAeeKAl5YmvUw 7lAU1ixSONTvDLWt/Nj3bP/6GCIZnj0Ex9lvOHcVNYokeA0Guue+u685Aoy45En1Ci4K cdTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=google header.b=MqBF5ZEr; 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=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j25si1615016ejy.187.2021.02.10.08.25.27; Wed, 10 Feb 2021 08:25:50 -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=pass header.i=@linuxfoundation.org header.s=google header.b=MqBF5ZEr; 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=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232212AbhBJQXb (ORCPT + 99 others); Wed, 10 Feb 2021 11:23:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37778 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232322AbhBJQXY (ORCPT ); Wed, 10 Feb 2021 11:23:24 -0500 Received: from mail-il1-x136.google.com (mail-il1-x136.google.com [IPv6:2607:f8b0:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 439DBC0613D6 for ; Wed, 10 Feb 2021 08:22:44 -0800 (PST) Received: by mail-il1-x136.google.com with SMTP id z18so2347684ile.9 for ; Wed, 10 Feb 2021 08:22:44 -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=JSh8ExYxdty8HZ11KujafrMp7iovLQF4x5Wy4WPKtFY=; b=MqBF5ZEr+daNm21Pgbp5M3xc3FrA2e2xhHAo0Dk1bkOF988nmvj/JIs0ba1jcPJ203 rl6mzOsv2xikvam4uDDIWkXM2lxulDO5Pw/Sz92l1FqLWb4bICKwNCirxhULXoxgy6w7 RnfuncRvRYQFUiRv98y3Apa/O2gIu6jPfC9xo= 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=JSh8ExYxdty8HZ11KujafrMp7iovLQF4x5Wy4WPKtFY=; b=HddHccqAUY7bhiaforJA6lWSvGoB4YCKXyYx0EJS3ARTHqPiE1ZRKgmzPb7O9kO/8m 7UIewci01ar4PyJ4KmEim0m+6WWv7p0wJhFcm6Z5HMMwUCIMUnzL4AFKYggkFK3w9xaB wQHlxrL9pspm4UKJXRsm8jyrL1dYC20rZrg/OhhOe5wKS5vhrMUIio7kB9QicragaRF9 piWFPczckc0PktjjdJexQ2IPRxXsvLuvKEZGo5zCkJsY4C+YbWWAXf37Ad9pi7PIjywY 0WDvXpiWNL4zR0/8PE+pOGuBZ6U2ZOEVLgoxsnn49bAiecKaSnffnpY5H536PtSjJJrk IdHA== X-Gm-Message-State: AOAM533CxyncXc226D0/UzMa/p6wfZU2YL3z39HcpUebWvgOkXaWUs6y X7vx05FzT+bJTRILCpHN6CByWA== X-Received: by 2002:a92:dcc6:: with SMTP id b6mr1836908ilr.295.1612974163736; Wed, 10 Feb 2021 08:22:43 -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 k11sm1129540iop.45.2021.02.10.08.22.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 10 Feb 2021 08:22:43 -0800 (PST) Subject: Re: [PATCH 2/5] ath10k: fix WARNING: suspicious RCU usage To: Kalle Valo Cc: davem@davemloft.net, kuba@kernel.org, ath10k@lists.infradead.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Shuah Khan References: <23a1333dfb0367cc69e7177a2e373df0b6d42980.1612915444.git.skhan@linuxfoundation.org> <20210210081320.2FBE5C433CA@smtp.codeaurora.org> From: Shuah Khan Message-ID: <7230c9e5-2632-b77e-c4f9-10eca557a5bb@linuxfoundation.org> Date: Wed, 10 Feb 2021 09:22:42 -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: <20210210081320.2FBE5C433CA@smtp.codeaurora.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 2/10/21 1:13 AM, Kalle Valo wrote: > 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 ath10k_wmi_tlv_parse_peer_stats_info() to hold RCU lock before it >> calls ieee80211_find_sta_by_ifaddr() and release it when the resulting >> pointer is no longer needed. The log below shows the problem. >> >> While at it, fix ath10k_wmi_tlv_op_pull_peer_stats_info() to do the same. >> >> ============================= >> WARNING: suspicious RCU usage >> 5.11.0-rc7+ #20 Tainted: G W >> ----------------------------- >> include/linux/rhashtable.h:594 suspicious rcu_dereference_check() usage! >> other info that might help us debug this: >> rcu_scheduler_active = 2, debug_locks = 1 >> no locks held by ksoftirqd/5/44. >> >> stack backtrace: >> CPU: 5 PID: 44 Comm: ksoftirqd/5 Tainted: G W 5.11.0-rc7+ #20 >> Hardware name: LENOVO 10VGCTO1WW/3130, BIOS M1XKT45A 08/21/2019 >> Call Trace: >> dump_stack+0x7d/0x9f >> lockdep_rcu_suspicious+0xdb/0xe5 >> __rhashtable_lookup+0x1eb/0x260 [mac80211] >> ieee80211_find_sta_by_ifaddr+0x5b/0xc0 [mac80211] >> ath10k_wmi_tlv_parse_peer_stats_info+0x3e/0x90 [ath10k_core] >> ath10k_wmi_tlv_iter+0x6a/0xc0 [ath10k_core] >> ? ath10k_wmi_tlv_op_pull_mgmt_tx_bundle_compl_ev+0xe0/0xe0 [ath10k_core] >> ath10k_wmi_tlv_op_rx+0x5da/0xda0 [ath10k_core] >> ? trace_hardirqs_on+0x54/0xf0 >> ? ath10k_ce_completed_recv_next+0x4e/0x60 [ath10k_core] >> ath10k_wmi_process_rx+0x1d/0x40 [ath10k_core] >> ath10k_htc_rx_completion_handler+0x115/0x180 [ath10k_core] >> ath10k_pci_process_rx_cb+0x149/0x1b0 [ath10k_pci] >> ? ath10k_htc_process_trailer+0x2d0/0x2d0 [ath10k_core] >> ? ath10k_pci_sleep.part.0+0x6a/0x80 [ath10k_pci] >> ath10k_pci_htc_rx_cb+0x15/0x20 [ath10k_pci] >> ath10k_ce_per_engine_service+0x61/0x80 [ath10k_core] >> ath10k_ce_per_engine_service_any+0x7d/0xa0 [ath10k_core] >> ath10k_pci_napi_poll+0x48/0x120 [ath10k_pci] >> net_rx_action+0x136/0x500 >> __do_softirq+0xc6/0x459 >> ? smpboot_thread_fn+0x2b/0x1f0 >> run_ksoftirqd+0x2b/0x60 >> smpboot_thread_fn+0x116/0x1f0 >> kthread+0x14b/0x170 >> ? smpboot_register_percpu_thread+0xe0/0xe0 >> ? __kthread_bind_mask+0x70/0x70 >> ret_from_fork+0x22/0x30 >> >> Signed-off-by: Shuah Khan > > Unlucky timing also on this one, it conflicts with a patch I applied yesterday: > > https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?h=ath-next&id=2615e3cdbd9c0e864f5906279c952a309871d225 > > Can you redo the patch to only change ath10k_wmi_event_tdls_peer()? > Yes. I will send the patch just for ath10k_wmi_event_tdls_peer() on top of your patch. > error: patch failed: drivers/net/wireless/ath/ath10k/wmi-tlv.c:240 > error: drivers/net/wireless/ath/ath10k/wmi-tlv.c: patch does not apply > stg import: Diff does not apply cleanly > > Patch set to Changes Requested. > thanks, -- Shuah