Skip to contentSkip to conversation

Fix crash after simultaneous authentication requests

PATCH In review Rafal Michalski 2 participants 2 messages Nov 25, 2010 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix crash after simultaneous authentication requests

Previously simultaneous authentication requests to the same device caused bluetoothd crash. Now if ongoing authentication occurs error is returned, preventing from simultaneous requests to the same device.

---
 src/device.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
src/device.c +5 -0
index 7c421e3..4427cd4 100644
@@ -2178,6 +2178,11 @@ int device_request_authentication(struct btd_device *device, auth_type_t type,
 	struct agent *agent;
 	int err;
 
+	if (device->authr) {
+		error("%s: authentication already requested", device->path);
+		return -EALREADY;
+	}
+
 	DBG("%s: requesting agent authentication", device->path);
 
 	agent = device_get_agent(device);
Signature · 1 line
1.6.3.3
#1 lore raw

Hi Rafal,

Quoted 6 lines · Rafal Michalski

Previously simultaneous authentication requests to the same device caused bluetoothd crash. Now if ongoing authentication occurs error is returned, preventing from simultaneous requests to the same device.

---
 src/device.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

Pushed upstream. Thanks.

Johan