Commit Graph

6 Commits

Author SHA1 Message Date
v-chenghuijin e1032e6693 Revert "Bluetooth: Prevent crash when calling uv_run after event loop closure."
bug: v/80385

This reverts commit 1974e4be0e.

Signed-off-by: v-chenghuijin <v-chenghuijin@xiaomi.com>
2026-01-23 09:22:13 +08:00
v-chenghuijin 1974e4be0e Bluetooth: Prevent crash when calling uv_run after event loop closure.
bug: V/80385

Rootcause: uv_loop_close() marks internal data structures as invalid (e.g., set to -1), but pending callbacks in the queue still reference these invalidated structures. When uv_run() is called later, it processes the queue using corrupted pointers, leading to segmentation faults and crashes. Solution: Introduce a new flag in uv_loop_close() to mark the loop as closed and check it in uv_run() and other loop-related functions to prevent execution of callbacks after closure, ensuring memory safety and avoiding invalid pointer access.

Signed-off-by: v-chenghuijin <v-chenghuijin@xiaomi.com>
2025-12-19 10:39:29 +08:00
chejinxian1 32e1c81391 bluetooth: Replace `calloc` with malloc for `signal_work_t` allocation in `thread_loop_work_sync`
bug: v/79115

Rootcause: Replace `calloc` with the C standard library function `malloc` to avoid compilation errors.

Signed-off-by: chejinxian1 <chejinxian1@xiaomi.com>
2025-11-28 21:36:20 +08:00
liuxiang18 9cb39dc0db bluetooth: fixed a use-after-free issue caused by ins->client_loop & ins have been released during worker execution.
bug: v/77699

When the client clears resources, if tasks are still executing in the worker thread at that time, it will lead to a use-after-free issue.

Signed-off-by: liuxiang18 <liuxiang18@xiaomi.com>
2025-11-13 21:14:16 +08:00
zhongzhijie1 9ff81d7dd9 Adjust the priority of bt_client to always be 1 higher than that of bluetoothd.
bug: v/58744

Signed-off-by: zhongzhijie1 <zhongzhijie1@xiaomi.com>
2025-06-17 23:25:06 +08:00
openvela-robot cf07bea530 Merge commit
Change-Id: If26995eebd18a82ac4cd827e6801458e57a6ead3
2024-11-25 17:34:53 +08:00