summaryrefslogtreecommitdiff
path: root/documentation/3.kernel/thread-comm
diff options
context:
space:
mode:
authorGuEe-GUI <[email protected]>2026-07-22 22:25:04 +0800
committerRbb666 <[email protected]>2026-08-03 09:43:57 +0800
commit9915dc66c197b9df63701bc3cb7837cd78b6f5d9 (patch)
tree8ba09a3c6deee634bfc4f4f83dc883de783f75d8 /documentation/3.kernel/thread-comm
parentfe751c152101fc88ad887b06d91e2d96aafc2883 (diff)
ipc: fix recursive data queue locking on SMP
rt_data_queue_pop() holds the data queue spinlock while updating the ring state, then calls rt_data_queue_len(). The length function tries to acquire the same non-recursive spinlock again, causing an SMP deadlock when a pop leaves the queue non-empty. Add a private _data_queue_len_nolock() helper for callers which already hold the queue lock. Keep the public rt_data_queue_len() protected by one spinlock acquisition. This does not change the public API, ABI, queue state transitions, low-water mark wakeups, or event callback behavior. Tested on a four-core Spacemit K1 with cyclic HDMI playback and by building the SMP QEMU Virt64 RISC-V BSP with generic audio, Intel HDA and VirtIO Sound. Signed-off-by: GuEe-GUI <[email protected]>
Diffstat (limited to 'documentation/3.kernel/thread-comm')
0 files changed, 0 insertions, 0 deletions