> From: Long Li <[email protected]>
> 
> Concurrent requests require the response handler and the waiting sender to
> agree on the lifetime and result state of each message slot.
> 
> Protect the caller's output buffer, Linux error and device status with a
> per-slot lock. Publish the output buffer only while the sender is waiting
> and withdraw it before every return. A late response therefore cannot copy
> through a pointer to caller storage whose lifetime has ended.
> 
> Reinitialize completion and result state when the slot is acquired. If
> the response records its result while the timed wait expires, return that
> result instead of reporting a false timeout.
> 
> HWC responses contain only the slot ID. After a genuine timeout, prevent
> the serialized bootstrap channel from reusing that ID until teardown. This
> keeps a stale response from completing a later request before the next
> patch replaces the depth-one latch with per-slot sender and response
> ownership.
> 
> Split response-status handling and request cleanup into helpers so the send
> path has structured returns rather than phase-jumping gotos.
> 
> Link: https://lore.kernel.org/r/[email protected]
> Link: https://lore.kernel.org/r/[email protected]
> Signed-off-by: Long Li <[email protected]>
> Signed-off-by: Wei Hu <[email protected]>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review ยท 
https://sashiko.dev/#/patchset/[email protected]?part=2


Reply via email to