OSDN Git Service
(root)
/
android-x86
/
hardware-broadcom-wlan.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
79c41bc
)
Fix a deadlock in wifi_cleanup
author
Vinit Deshpande
<vinitd@google.com>
Fri, 5 Jun 2015 03:01:03 +0000
(20:01 -0700)
committer
Vinit Deshpande
<vinitd@google.com>
Fri, 5 Jun 2015 03:01:03 +0000
(20:01 -0700)
pthread_mutex isn't re-entrant; and results in a hang
if called second time from the same thread. This change
ensures that it is locked only once.
Bug:
21627368
Change-Id: I9c28c1df240316c2a7eafdefa990b9582bc05a9a
bcmdhd/wifi_hal/wifi_hal.cpp
patch
|
blob
|
history
diff --git
a/bcmdhd/wifi_hal/wifi_hal.cpp
b/bcmdhd/wifi_hal/wifi_hal.cpp
index
03bcc4b
..
20d2b28
100644
(file)
--- a/
bcmdhd/wifi_hal/wifi_hal.cpp
+++ b/
bcmdhd/wifi_hal/wifi_hal.cpp
@@
-283,7
+283,9
@@
void wifi_cleanup(wifi_handle handle, wifi_cleaned_up_handler handler)
WifiCommand *cmd = (WifiCommand *)cbi->cb_arg;
if (cmd != NULL) {
cmd->addRef();
+ pthread_mutex_unlock(&info->cb_lock);
cmd->cancel();
+ pthread_mutex_lock(&info->cb_lock);
cmd->releaseRef();
}
}