* [PATCH] Fix crash after simultaneous authentication requests
@ 2010-11-25 10:06 Rafal Michalski
2010-11-25 20:11 ` Johan Hedberg
0 siblings, 1 reply; 2+ messages in thread
From: Rafal Michalski @ 2010-11-25 10:06 UTC (permalink / raw)
To: linux-bluetooth; +Cc: 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(-)
diff --git a/src/device.c b/src/device.c
index 7c421e3..4427cd4 100644
--- a/src/device.c
+++ b/src/device.c
@@ -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);
--
1.6.3.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Fix crash after simultaneous authentication requests
2010-11-25 10:06 [PATCH] Fix crash after simultaneous authentication requests Rafal Michalski
@ 2010-11-25 20:11 ` Johan Hedberg
0 siblings, 0 replies; 2+ messages in thread
From: Johan Hedberg @ 2010-11-25 20:11 UTC (permalink / raw)
To: Rafal Michalski; +Cc: linux-bluetooth
Hi Rafal,
On Thu, Nov 25, 2010, Rafal Michalski wrote:
> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-11-25 20:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-25 10:06 [PATCH] Fix crash after simultaneous authentication requests Rafal Michalski
2010-11-25 20:11 ` Johan Hedberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox