Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp961275rwb; Wed, 7 Dec 2022 07:07:01 -0800 (PST) X-Google-Smtp-Source: AA0mqf4lywNcHyF259Q+/Z7nOg1ALsFi+V76BrjfSk23z3qxhK4i972YkMpQwtlEj9IuXuTYmooL X-Received: by 2002:a17:906:ee1:b0:78a:efde:b84a with SMTP id x1-20020a1709060ee100b0078aefdeb84amr76857139eji.744.1670425621078; Wed, 07 Dec 2022 07:07:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670425621; cv=none; d=google.com; s=arc-20160816; b=Tpcr5eRiFiP0vY8RmWUrIblzYXGdQcXp9AI+VqgJdCVAlFj9KgXp3tIOzwn3eNqmZD dsgi4jZ2D2dUUYkhTDHeE95SsVCSw+zCOUKb0HWncfzydk6HEzRDMlD7tCCaEJ5yM1mO 3QgmLWjKeM1eor7fG3biQhqo5qnFFTA3guz0t3BRC1NnR5FlpmwEonBhGYyfjcyd+8i1 AJjkx7zjb1LregxaLj0QyJDqOaFNZvp/zhm0f2qtB3l/QGsr3Zu6U26nm9duZayWYfsF A5MZng7iOoQslnQkmgR+Y2FyOc2v4spMh2UVhi1UppYe4wqgzTmJDCV8CkGz3zv7A++r fYGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=jSAUMr/co7gqwSDrXGdry9cQ/2kXrC8PDl34VUObiGI=; b=i8r+EiEvjGRco/PVHvzbsHQkG2K0AgKlaZEsBs6npRLQFPpqEQuIrvYtMIgo0gPDhS IMtRAHAn+atXN/ws0PlCQGarQKF/A4YdrIU3ow0J5KwPhsMxibZ3AHQ/9yI1AXkkec+G I8JQq2RRqB4WxvsW/t124M0FFTo5MUDrqm4qnNGapaLm/9fEADDpD8ucK6SrdMMlxVBd yrvXlAWUMD3VsbOvfRYxC0HZp/OzU/2uc/py3Sa5Yeo6zjYwvH8zCIoLKnIovAKOR+DI NCGKqlwxO2H6cPqAj81oRIUmfZRcmVdD5OVJwxamI25X0KWz2WVa+5uR6WhnyLxGvL+M SHug== 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; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id wu9-20020a170906eec900b007ae1723e8d7si18037585ejb.610.2022.12.07.07.06.43; Wed, 07 Dec 2022 07:07:01 -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; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229522AbiLGPDV (ORCPT + 66 others); Wed, 7 Dec 2022 10:03:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230172AbiLGPCw (ORCPT ); Wed, 7 Dec 2022 10:02:52 -0500 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 34DE7388C for ; Wed, 7 Dec 2022 07:02:36 -0800 (PST) Received: from dggpemm500007.china.huawei.com (unknown [172.30.72.53]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4NS0qX2mtJzmWRv; Wed, 7 Dec 2022 23:01:44 +0800 (CST) Received: from huawei.com (10.175.103.91) by dggpemm500007.china.huawei.com (7.185.36.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Wed, 7 Dec 2022 23:02:34 +0800 From: Yang Yingliang To: , , CC: Subject: [PATCH v2 4/4] libertas/cmdresp: don't call kfree_skb() under spin_lock_irqsave() Date: Wed, 7 Dec 2022 23:00:08 +0800 Message-ID: <20221207150008.111743-5-yangyingliang@huawei.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221207150008.111743-1-yangyingliang@huawei.com> References: <20221207150008.111743-1-yangyingliang@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.103.91] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpemm500007.china.huawei.com (7.185.36.183) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, 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 It is not allowed to call kfree_skb() from hardware interrupt context or with interrupts being disabled. So replace kfree_skb() with dev_kfree_skb_irq() under spin_lock_irqsave(). Compile tested only. Fixes: f52b041aed77 ("libertas: Add spinlock to avoid race condition") Signed-off-by: Yang Yingliang --- drivers/net/wireless/marvell/libertas/cmdresp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/marvell/libertas/cmdresp.c b/drivers/net/wireless/marvell/libertas/cmdresp.c index cb515c5584c1..74cb7551f427 100644 --- a/drivers/net/wireless/marvell/libertas/cmdresp.c +++ b/drivers/net/wireless/marvell/libertas/cmdresp.c @@ -48,7 +48,7 @@ void lbs_mac_event_disconnected(struct lbs_private *priv, /* Free Tx and Rx packets */ spin_lock_irqsave(&priv->driver_lock, flags); - kfree_skb(priv->currenttxskb); + dev_kfree_skb_irq(priv->currenttxskb); priv->currenttxskb = NULL; priv->tx_pending_len = 0; spin_unlock_irqrestore(&priv->driver_lock, flags); -- 2.25.1