summaryrefslogtreecommitdiffstats
path: root/LICENSE
diff options
context:
space:
mode:
authorRaquel Medina <raquel.medina@konsulko.com>2020-07-13 13:48:03 +0200
committerRaquel Medina <raquel.medina@konsulko.com>2020-07-13 22:44:09 +0200
commitc5db00e8e44b58384e117aa872e32f57231c00e1 (patch)
tree29f7bcb842bda086313cbab1c10ad4ad7094c700 /LICENSE
parent542f2a95de3f08b22969d1f4899aa343da5e44ae (diff)
fix segfaults due to races & missing adapter
During start up, there are races between the bluetooth, persistence, bluetooth-map and bluetooth-pbap bindings; on top of it, in the case there's no bluetooth controller in the system, various key parameters can exhibit a null value. The combination of these races and the lack of bluetooth controller can manifest in a number of segfaults in the bluetooth binding (it's very easy to reproduce on qemu). This commit brings in several changes to make the bluetooth binding resilient to the races and lack of bluetooth controller: * on startup, retrieve the default adapter from the persistence binding from the init thread * store the system default adapter in the service init data structure, and store the active adapter in the bluetooth state structure. * update get_default_adapter to return value obtained from persistence biding, without further processing; * add guards to make sure the userdata retrieved from the application framework is valid; * on verbs processing, ensure the caller provides an adapter to apply the verb to, or that at least there's a valid adapter associated to the bluetooth state structure; * initialize agent_data's device_path following free operation; * add guards for mediaplayer_path. Bug-AGL: SPEC-3301 Signed-off-by: Raquel Medina <raquel.medina@konsulko.com> Change-Id: Ia5a0dc9a61024ff43cd247216d0dff6918046f7e
Diffstat (limited to 'LICENSE')
0 files changed, 0 insertions, 0 deletions