Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1543310ybh; Thu, 23 Jul 2020 11:27:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzGvdUqU4FCDPr6IYOyMqJ6Lzh4reXj3IvnoAHyCSDKlDlUvpcO7MFiUVmSy2bN73VcSaf7 X-Received: by 2002:a17:906:e294:: with SMTP id gg20mr5368524ejb.521.1595528832112; Thu, 23 Jul 2020 11:27:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595528832; cv=none; d=google.com; s=arc-20160816; b=DuGNtXNfS6VVPHOdIzt5EYOqGXNnsuHBQ1KbprZ7z+ze+XuKw/WmRZKRof0w//Rtzz egNoI4q/P2RPS4Mhz3vOHHpf4+M6Xr7A0VPzdORlDcMnOkbLyu//2GeuRMjSCURmRlCA wuylKvEHUAfmYuOGgTFm9gNwP8xeIQLntXm4x7AWx16vQlptgFC46++Sao8q7GPI+0q4 XAR718RomvjCJuX9n7A5dFTOe+62NsZ5i5x67icvFfyBDJwoa1LQQwpqpx2VoSWZsJfZ MR6PgucBt8hcspuBn37minLr4dMhZzplmJdMRaPfvoDKfAiE+XK5XtlrO5HtVy3K7C9s DgrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language:thread-index :content-transfer-encoding:mime-version:message-id:date:subject :in-reply-to:references:cc:to:from:dmarc-filter:dkim-signature; bh=n1W6ocoKrcYfitGwsuovGrOv9EGxLgCgVMXxSlmwsjY=; b=yU6BmlJ6732xY7w3x4eHgdvSxUf40Fqb5RPTQPLCZKn+LRUFtdJR5ghiOc6D0U8tuE aKUu6nQ9z/oLRWyAfWvOemcQwHGbigyVuMvRmS2GzJFV3DgejMgNQcDgDN9Dz+fvBdT+ d/Vf1XAh6NTrqecCA8wvyD/VuTiQHiSvO+KDLAKZXlaJGF+HoOEWZHbpGO2Qg8F8o8is TwyKVlKMKx8s3QaQXZgzCOs8GBcGacmgATCvSKkOH28JeAVRqd05T+rHP+2pksZLgHpZ TVuVnzpsLZUIWLc3gtihmEPsC7ecVQsVRnI1cF+bct3kTGUrZsUfUtDqQPia0oifqt82 /f/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=ebarM5uI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 bd18si2255952edb.31.2020.07.23.11.26.49; Thu, 23 Jul 2020 11:27:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@mg.codeaurora.org header.s=smtp header.b=ebarM5uI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727097AbgGWS00 (ORCPT + 99 others); Thu, 23 Jul 2020 14:26:26 -0400 Received: from m43-7.mailgun.net ([69.72.43.7]:64088 "EHLO m43-7.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726304AbgGWS0Z (ORCPT ); Thu, 23 Jul 2020 14:26:25 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1595528785; h=Content-Transfer-Encoding: Content-Type: MIME-Version: Message-ID: Date: Subject: In-Reply-To: References: Cc: To: From: Sender; bh=n1W6ocoKrcYfitGwsuovGrOv9EGxLgCgVMXxSlmwsjY=; b=ebarM5uIZMa6As2qwhzYoSGcGUfQgRO2IIOAaP55JZTvd3ZRbNgQ07xbzJ1j2DCRt583p8Vw p2a3vVX7xBSq1TJfv22kc0jZ3/N5UhshYpnlmBf1bBeYR+1BvaXEOjXcxyelaaMB8Wjo8oE0 DEFpR8MkQkKSVeiLbqY5Vx/na38= X-Mailgun-Sending-Ip: 69.72.43.7 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n10.prod.us-west-2.postgun.com with SMTP id 5f19d6515b75bcda60cc9287 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Thu, 23 Jul 2020 18:26:25 GMT Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 12821C43395; Thu, 23 Jul 2020 18:26:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED,SPF_NONE, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from Pillair (unknown [183.83.71.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: pillair) by smtp.codeaurora.org (Postfix) with ESMTPSA id 42796C433C9; Thu, 23 Jul 2020 18:26:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 42796C433C9 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=none smtp.mailfrom=pillair@codeaurora.org From: "Rakesh Pillai" To: "'Johannes Berg'" , Cc: , , , , , , , References: <1595351666-28193-1-git-send-email-pillair@codeaurora.org> <1595351666-28193-2-git-send-email-pillair@codeaurora.org> <0dbdef912f9d61521011f638200fd451a3530568.camel@sipsolutions.net> In-Reply-To: <0dbdef912f9d61521011f638200fd451a3530568.camel@sipsolutions.net> Subject: RE: [RFC 1/7] mac80211: Add check for napi handle before WARN_ON Date: Thu, 23 Jul 2020 23:56:18 +0530 Message-ID: <003201d6611e$c54a1c90$4fde55b0$@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQG1Bu1FBYi7G1oVhHY/01uT1gSslwIktOPGArPni2WpMWqJMA== Content-Language: en-us Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > -----Original Message----- > From: Johannes Berg > Sent: Wednesday, July 22, 2020 6:26 PM > To: Rakesh Pillai ; ath10k@lists.infradead.org > Cc: linux-wireless@vger.kernel.org; linux-kernel@vger.kernel.org; > kvalo@codeaurora.org; davem@davemloft.net; kuba@kernel.org; > netdev@vger.kernel.org; dianders@chromium.org; evgreen@chromium.org > Subject: Re: [RFC 1/7] mac80211: Add check for napi handle before > WARN_ON >=20 > On Tue, 2020-07-21 at 22:44 +0530, Rakesh Pillai wrote: > > The function ieee80211_rx_napi can be now called > > from a thread context as well, with napi context > > being NULL. > > > > Hence add the napi context check before giving out > > a warning for softirq count being 0. > > > > Tested-on: WCN3990 hw1.0 SNOC WLAN.HL.3.1-01040-QCAHLSWMTPLZ-1 > > > > Signed-off-by: Rakesh Pillai > > --- > > net/mac80211/rx.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c > > index a88ab6f..1e703f1 100644 > > --- a/net/mac80211/rx.c > > +++ b/net/mac80211/rx.c > > @@ -4652,7 +4652,7 @@ void ieee80211_rx_napi(struct ieee80211_hw > *hw, struct ieee80211_sta *pubsta, > > struct ieee80211_supported_band *sband; > > struct ieee80211_rx_status *status =3D IEEE80211_SKB_RXCB(skb); > > > > - WARN_ON_ONCE(softirq_count() =3D=3D 0); > > + WARN_ON_ONCE(napi && softirq_count() =3D=3D 0); >=20 > FWIW, I'm pretty sure this is incorrect - we make assumptions on > softirqs being disabled in mac80211 for serialization and in place of > some locking, I believe. >=20 I checked this, but let me double confirm. But after this change, no packet is submitted from driver in a softirq = context. So ideally this should take care of serialization. > johannes