HomeFreeBSD

mpr/mps: Fix a race in diagnostic reset

Description

mpr/mps: Fix a race in diagnostic reset

There's a small race in freezing the simq when performing a diagnostic
reset. During this time, a transaction can slip through and encounter
the target id of 0. If we're still in diagnostic reset when we detect
this, return a CAM_DEVICE_NOT_THERE status. Instead, freeze the queue
and return a requeue status, similar to what we do when we're resetting
a target and a transaction get here. The race is unavoidable due to
separate locks for queue and SIM, but easy enough to detect and make
harmless.

Sponsored by: Netflix
Reviewed by: scottl, mav
Differential Revision: https://reviews.freebsd.org/D34017

Details

Provenance
impAuthored on Jan 25 2022, 11:23 PM
Reviewer
scottl
Differential Revision
D34017: mpr/mps: Fix a race in diagnostic reset
Parents
rG5fcb5ae8dcb2: Remove a stale comment.
Branches
Unknown
Tags
Unknown