Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp198896rwb; Wed, 7 Dec 2022 16:40:47 -0800 (PST) X-Google-Smtp-Source: AA0mqf5D01kQYpdwIdfXfbh+KfudG70EJW31gCmRGyiMO06R2ilYKrPZAlJvnL72+Vrxc1iENW36 X-Received: by 2002:a63:5c1e:0:b0:46e:96ba:494d with SMTP id q30-20020a635c1e000000b0046e96ba494dmr66871207pgb.404.1670460047568; Wed, 07 Dec 2022 16:40:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670460047; cv=none; d=google.com; s=arc-20160816; b=nAOcAyuFJXd2NmCEdqN9YVgGTaCjfLNrw0peu7w/p7fj+yKjr964MJdR/i3QfDEroH LK9q8pEBVZhOBBZRRPISzlasIfb2t9zfeVqGTfWhvXutEbtWTe7TGDjmdBDUQ76v//kh +hXQWlbsq0eMZKgk0k1NckHYoTwZ1PoRm2TDoquBWY0/BTzWlI+o7pP16WWox/yUVZWc 9/P+i4853rbBh5AMo3gR+VSlWQIpTeCPOr28rKcLYOtviioMvGRz/DOs/3VFWOaq3NiF sygJEaoDZKPaV2ESCcEOhLjcxgG9+7j9+xbYhqjM92Zf+g/sF0fD6bhhoPo0MrICwAtY 3cIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:authenticated-by; bh=7ZYBXNkUWPik/bGzGeibKrdozzbTezRRbDg/f1SBfV0=; b=FQGNgknjiYHluZCCMxeT1/yUV4AeLdm0X704DAfb13mblwMsJzhHZlfMw5Z2pAA6k3 k60tf8DtFjskQHEUjWrXE4o8pj+Y6B6p+3fED1CqQU5dcSp5t98vv+0Q0P0zzhS3wTRJ 5LBS0DkSOkjoSOBW4cWLdTbVuYfJB8FbRA97/TkEI7XqFMf7y6IOhfIrct9NuPfipPMu k+kZf3CwnDR1yvkxXBgivOeLI+tzPwtihrPc829U+guerPRpJ2VAxcRtR6YGrA9STA/9 +2ij/XX9Jua2jF3wetrLeANt70UF9Oc+NrXeUEYNtSl49nuM2sMYWdMiLUpyX9/RPnhF l3YQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o15-20020a170902d4cf00b00186b697ec66si22482524plg.399.2022.12.07.16.40.35; Wed, 07 Dec 2022 16:40:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229743AbiLHAjM convert rfc822-to-8bit (ORCPT + 65 others); Wed, 7 Dec 2022 19:39:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56410 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229861AbiLHAjK (ORCPT ); Wed, 7 Dec 2022 19:39:10 -0500 Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6B48F8D657 for ; Wed, 7 Dec 2022 16:39:09 -0800 (PST) Authenticated-By: X-SpamFilter-By: ArmorX SpamTrap 5.77 with qID 2B80bHjJ5027231, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexh36506.realtek.com.tw[172.21.6.27]) by rtits2.realtek.com.tw (8.15.2/2.81/5.90) with ESMTPS id 2B80bHjJ5027231 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=FAIL); Thu, 8 Dec 2022 08:37:17 +0800 Received: from RTEXMBS05.realtek.com.tw (172.21.6.98) by RTEXH36506.realtek.com.tw (172.21.6.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.9; Thu, 8 Dec 2022 08:38:04 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXMBS05.realtek.com.tw (172.21.6.98) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Thu, 8 Dec 2022 08:38:04 +0800 Received: from RTEXMBS04.realtek.com.tw ([fe80::15b5:fc4b:72f3:424b]) by RTEXMBS04.realtek.com.tw ([fe80::15b5:fc4b:72f3:424b%5]) with mapi id 15.01.2375.007; Thu, 8 Dec 2022 08:38:04 +0800 From: Ping-Ke Shih To: Yang Yingliang , "Jes.Sorensen@gmail.com" , "kvalo@kernel.org" CC: "linux-wireless@vger.kernel.org" Subject: RE: [PATCH] wifi: rtl8xxxu: don't call dev_kfree_skb() under spin_lock_irqsave() Thread-Topic: [PATCH] wifi: rtl8xxxu: don't call dev_kfree_skb() under spin_lock_irqsave() Thread-Index: AQHZCknMh5bOyluekkWY/C/aux+hXK5jJXAA Date: Thu, 8 Dec 2022 00:38:04 +0000 Message-ID: <0cfea9eaf08446d5a7dfcb85da34dcf2@realtek.com> References: <20221207143738.67721-1-yangyingliang@huawei.com> In-Reply-To: <20221207143738.67721-1-yangyingliang@huawei.com> Accept-Language: en-US, zh-TW Content-Language: zh-TW X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.21.69.188] x-kse-serverinfo: RTEXMBS05.realtek.com.tw, 9 x-kse-attachmentfiltering-interceptor-info: no applicable attachment filtering rules found x-kse-antivirus-interceptor-info: scan successful x-kse-antivirus-info: =?us-ascii?Q?Clean,_bases:_2022/12/7_=3F=3F_10:00:00?= x-kse-bulkmessagesfiltering-scan-result: protection disabled Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org > -----Original Message----- > From: Yang Yingliang > Sent: Wednesday, December 7, 2022 10:38 PM > To: Jes.Sorensen@gmail.com; kvalo@kernel.org > Cc: linux-wireless@vger.kernel.org > Subject: [PATCH] wifi: rtl8xxxu: don't call dev_kfree_skb() under spin_lock_irqsave() > > It is not allowed to call consume_skb() from hardware interrupt context ^^^^^^^^^^^^^ kfree_skb()? because this patch is to replace dev_kfree_skb(). > or with interrupts being disabled. So replace dev_kfree_skb() with > dev_consume_skb_irq() under spin_lock_irqsave(). Compile tested only. > > Fixes: 26f1fad29ad9 ("New driver: rtl8xxxu (mac80211)") > Signed-off-by: Yang Yingliang > --- > drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c > b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c > index ac641a56efb0..d0600af5bef4 100644 > --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c > +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c > @@ -5274,7 +5274,7 @@ static void rtl8xxxu_queue_rx_urb(struct rtl8xxxu_priv *priv, > pending = priv->rx_urb_pending_count; > } else { > skb = (struct sk_buff *)rx_urb->urb.context; > - dev_kfree_skb(skb); > + dev_consume_skb_irq(skb); Why not dev_kfree_skb_irq() instead? any reason? > usb_free_urb(&rx_urb->urb); > } > > -- > 2.25.1 > > > ------Please consider the environment before printing this e-mail.