diff options
| author | niuxiaoch <[email protected]> | 2026-11-23 14:56:13 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-11-23 14:56:13 +0800 |
| commit | b562d73c7e30ffca52b6dbe65146e3f4cc1129a1 (patch) | |
| tree | a1ecee258ae9d3a7c934e184d9aa89f261fb9053 /components/external/SQLite-3.8.1/test/capi3d.test | |
| parent | dbdf2d3ef67a300ded90284073c6aafd789ffd9a (diff) | |
* [pm] fix race condition and lock protection in rt_pm_device_register/unregister
1. Initialize `device_pm` fields before appending the node to `_pm.device_list` in `rt_pm_device_register()` to prevent exposing uninitialized pointers.
2. Protect `_pm.device_list` modifications with `rt_hw_interrupt_disable()` / `rt_hw_interrupt_enable()` while keeping `RT_KERNEL_MALLOC()` and `RT_KERNEL_FREE()` outside the interrupt-disabled critical section to avoid SMP hang (#10075).
Fixes #10075
Signed-off-by: niuxiaoch <[email protected]>
* [pm] document locking rules for rt_pm_device_register/unregister
Document that _pm.device_list updates are serialized with PM list walkers
via rt_hw_interrupt_disable() (rt_cpus_lock() on SMP), and that the APIs
must not be called from interrupt context or rt_device_pm_ops callbacks.
Restore the original unregister comment wording.
Signed-off-by: niuxiaoch <[email protected]>
---------
Signed-off-by: niuxiaoch <[email protected]>
Diffstat (limited to 'components/external/SQLite-3.8.1/test/capi3d.test')
0 files changed, 0 insertions, 0 deletions
