HomeFreeBSD

Fix race condition in its_cmd_send()

Description

Fix race condition in its_cmd_send()

its_cmd_send() can be called by multiple CPUs simultaneously.
After the command is pushed to ITS command ring the completion
status is polled using global pointer to the next free ring slot.
Use copied pointer and provide correct locking to avoid spurious
pointer value when concurrent access occurs.

Obtained from: Semihalf
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3436

Details

Provenance
zbbAuthored on
Differential Revision
D3436: its_cmd_send may return prior to command being completed
Parents
rS287163: Fix SEE ALSO.
Branches
Unknown
Tags
Unknown