Files
RedBear-OS/drivers/usb/xhcid
Red Bear OS dd0127b635 xhci: snapshot event TRB before clearing live DMA entry (F1.1)
Fixes the F1.1 review finding. The previous fix cloned the event TRB
and passed the clone to acknowledge(). trb.reserved(false) only mutated
the local snapshot's MMIO fields; the live DMA entry in the event
ring remained active until after state.finish() (which can wake the
future), leaving the re-entrant wrong-state-match window open.

Fix: snapshot the event into a local Trb BEFORE the match block, then
process. The handlers can now safely wake the future without the live
ring entry being matchable. event_trb.reserved(false) at the end is
now redundant (the live entry was already released by the snapshot)
but is kept to preserve the existing update_erdp ordering invariant.
2026-07-27 20:28:56 +09:00
..