Repository navigation
fix(spi): guard show() wait, avoid streaming DRAINING livelock, protect channels 1..N, bound dtor - #5502
Conversation
…ct channels 1..N, bound dtor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 6 minutes. View limit details
Note
|
Memory usage (this PR vs. its merge base)Change in
|
Fixes item #12 from #5492.
Summary
show()wait & streamingDRAININGlivelock fix: DetachmEnqueuedChannelsinto a localpendinglist before callingwaitForReady()sopoll()can reachREADYonce the active frame finishes instead of livelocking inDRAINING. On timeout, release and droppendingcleanly without disturbing the in-flight frame.pendingassetInUse(true)upfront inshow()so channels 1..N cannot be mutated while channel 0 is streaming/transmitting; release group channels immediately if a non-streaming batch fails.while (poll() != DriverState::READY) {}spin loop in~SpiChannelEngineAdapter()with boundedwaitForReady(), then shut down controllers, clear completion callbacks, and release any remaining in-flight channels.Verification
bash lintpassed on both modified files.bash test spi_channel_adapter --debugpassed (ASAN/LSAN/UBSAN), including a new regression test for channels 1..NisInUse()protection, stuck-busyshow()drop avoidingDRAININGlivelock, and bounded destructor cleanup.