Files
openwrt-master/target/linux/bcm27xx/patches-6.6/950-1218-Bluetooth-hci_sync-Fix-crash-on-NULL-parent.patch
domenico c06fb25d1f
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
Initial commit
2025-06-24 14:35:53 +02:00

28 lines
888 B
Diff

From ad2babc6596ba4f500454a4eaa607f3b49fcbcbe Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.com>
Date: Wed, 7 Aug 2024 17:41:31 +0100
Subject: [PATCH 1218/1350] Bluetooth: hci_sync: Fix crash on NULL parent
Although later functions can handle a NULL fwnode, fwnode can't handle
being passed a NULL pointer.
See: https://github.com/raspberrypi/linux/issues/6305
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
---
net/bluetooth/hci_sync.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/net/bluetooth/hci_sync.c
+++ b/net/bluetooth/hci_sync.c
@@ -4872,7 +4872,8 @@ static const struct {
*/
static int hci_dev_setup_sync(struct hci_dev *hdev)
{
- struct fwnode_handle *fwnode = dev_fwnode(hdev->dev.parent);
+ struct fwnode_handle *fwnode =
+ hdev->dev.parent ? dev_fwnode(hdev->dev.parent) : NULL;
int ret = 0;
bool invalid_bdaddr;
size_t i;