From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3D30B881F for ; Fri, 10 Mar 2023 14:47:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9294FC4339B; Fri, 10 Mar 2023 14:47:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1678459623; bh=QE4MKEUIa2n5G9hC+F96AtHS9wGpx17d9YFvAYE1ZrU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nPWoA2w/ulRSYTR7e2K3Tbfkk/BmKk3cE4dRWzng47dYoPgLERWoXAQ/oBLem0EK4 4ClH2ruU/mDr/gjtU8wKzO7kWiEVu5SdZrkA0P19s9DhaOYVHO7+BN2weSWNmiltx1 rDnHV2RpRGTJFrMhP170/ZJ88Z1DFPmlD+j533Q4= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Yang Yingliang , Kalle Valo , Sasha Levin Subject: [PATCH 5.10 066/529] wifi: libertas: main: dont call kfree_skb() under spin_lock_irqsave() Date: Fri, 10 Mar 2023 14:33:29 +0100 Message-Id: <20230310133808.046095601@linuxfoundation.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230310133804.978589368@linuxfoundation.org> References: <20230310133804.978589368@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Yang Yingliang [ Upstream commit f393df151540bf858effbd29ff572ab94e76a4c4 ] 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: d2e7b3425c47 ("libertas: disable functionality when interface is down") Signed-off-by: Yang Yingliang Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20221207150008.111743-4-yangyingliang@huawei.com Signed-off-by: Sasha Levin --- drivers/net/wireless/marvell/libertas/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/marvell/libertas/main.c b/drivers/net/wireless/marvell/libertas/main.c index 36237457d1363..1c56cc2742b07 100644 --- a/drivers/net/wireless/marvell/libertas/main.c +++ b/drivers/net/wireless/marvell/libertas/main.c @@ -217,7 +217,7 @@ int lbs_stop_iface(struct lbs_private *priv) spin_lock_irqsave(&priv->driver_lock, flags); priv->iface_running = false; - 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.39.2