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 D51FF46B7 for ; Mon, 16 Jan 2023 16:18:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 55C6FC433D2; Mon, 16 Jan 2023 16:18:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1673885929; bh=HmFwWceY8MtVtn10Vydj3WI6d2uxZBsjHLu/7tTDg0k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kRKsdBAYKZG4yRbQLT4idNhqL0c3woMS128Fjv2M3Oxfz1YzKqD7TgEhXUb8ows/i CzreZweGjjn1ns2x+KpN+Q5xqAjjbNqN2O+8Xq+J9L8p6CPmFsa3ep6Q8TwPLL8E9z F+UyWVqhIFzytkTNkmG0bFIW+UDSaub3uIbVCAI8= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Yang Yingliang , Luiz Augusto von Dentz , Sasha Levin Subject: [PATCH 5.4 237/658] Bluetooth: hci_core: dont call kfree_skb() under spin_lock_irqsave() Date: Mon, 16 Jan 2023 16:45:25 +0100 Message-Id: <20230116154920.389174608@linuxfoundation.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230116154909.645460653@linuxfoundation.org> References: <20230116154909.645460653@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 39c1eb6fcbae8ce9bb71b2ac5cb609355a2b181b ] 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(). Fixes: 9238f36a5a50 ("Bluetooth: Add request cmd_complete and cmd_status functions") Signed-off-by: Yang Yingliang Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Sasha Levin --- net/bluetooth/hci_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index 2ebb6480b6ec..e5e1c139f211 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -4455,7 +4455,7 @@ void hci_req_cmd_complete(struct hci_dev *hdev, u16 opcode, u8 status, *req_complete_skb = bt_cb(skb)->hci.req_complete_skb; else *req_complete = bt_cb(skb)->hci.req_complete; - kfree_skb(skb); + dev_kfree_skb_irq(skb); } spin_unlock_irqrestore(&hdev->cmd_q.lock, flags); } -- 2.35.1