Fork from pix106's tree
Find a file
Kevin Tang 3fb8076a5e fixing a race condition on MsgTask::destroy()
when MsgTask::destroy() happens, msg_q_unblock() triggers
the running thread to come out from blocking state. A race
condition may happen such that that thread may complete
first, causing msgTask obj to be already deleted. A next
allocation may change the value at MsgTask::mThread. Then
when control comes back to destroy(), it may try to check
mThread and call delete on it to crash the program.

mThread is a heap obj, so it is possible to delete it after
the hosting msgTask obj is deleted.  We just have to keep
its value on the stack before calling msg_q_unblock().

Change-Id: If15884815eea05fbfa523ec92aa300ed21ef897c
CR-Fixed: 1091530
2017-03-15 18:33:17 -07:00
android Merge "Rename FlpAPIClient and GnssMeasurementAPIClient" 2017-03-07 19:18:51 -08:00
core hidl gnss hal 1.0 implementation 2017-02-28 16:47:59 -08:00
etc Remove USE_EMERGENCY_FOR_EMERGENCY_SUPL and SUPL_ES in gps.conf 2016-10-09 03:11:52 -07:00
gnss Enable Measurement and poly for QDR for automotive usecase 2017-03-10 17:22:03 +05:30
location Merge "Rename FlpAPIClient and GnssMeasurementAPIClient" 2017-03-07 19:18:51 -08:00
utils fixing a race condition on MsgTask::destroy() 2017-03-15 18:33:17 -07:00
Android.mk LocationAPI implementation 2017-02-28 16:47:50 -08:00
CleanSpec.mk Merge branch jb_mr1 into jb_2.6 2013-06-11 14:58:24 -07:00
configure.ac Decouple libhardware usage on LE for gnss models 2017-02-14 16:51:32 -08:00
loc-hal.pc.in Decouple libhardware usage on LE for gnss models 2017-02-14 16:51:32 -08:00
Makefile.am loc-hal:porting from ANDROID_LNX.LA.3.5.1_RB1.04.04.02.048.040 2014-12-04 23:07:12 -08:00