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 50CDC6FA0 for ; Mon, 16 Jan 2023 17:06:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CA88EC433EF; Mon, 16 Jan 2023 17:06:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1673888789; bh=tdYHYoopEl41NRgPSWcSzbvj+v5m1bNunPuCWap0kUA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xBMLjW7f6KZKYvRB5Kh7V9FQNdNqUWniCCOnRlOzvidEW0kWFdoWspyEgN0FUtkLN 9W/TfbvBkt1v3oR9bLddz0sLyiaIFuQZARV6rKjrshti0ILi25fi8gvaxAk5HoHbqv 0+cfwPVNAzW0BSlJus7keTNTSEq6OY3L8noZpcbg= 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 4.14 139/338] Bluetooth: RFCOMM: dont call kfree_skb() under spin_lock_irqsave() Date: Mon, 16 Jan 2023 16:50:12 +0100 Message-Id: <20230116154826.905506796@linuxfoundation.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230116154820.689115727@linuxfoundation.org> References: <20230116154820.689115727@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 0ba18967d4544955b2eff2fbc4f2a8750c4df90a ] 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: 81be03e026dc ("Bluetooth: RFCOMM: Replace use of memcpy_from_msg with bt_skb_sendmmsg") Signed-off-by: Yang Yingliang Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Sasha Levin --- net/bluetooth/rfcomm/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c index 3f7d042a09b4..3d1287d02fdd 100644 --- a/net/bluetooth/rfcomm/core.c +++ b/net/bluetooth/rfcomm/core.c @@ -593,7 +593,7 @@ int rfcomm_dlc_send(struct rfcomm_dlc *d, struct sk_buff *skb) ret = rfcomm_dlc_send_frag(d, frag); if (ret < 0) { - kfree_skb(frag); + dev_kfree_skb_irq(frag); goto unlock; } -- 2.35.1