HomeFreeBSD

cam_periph_ccbwait could return while ccb in progress

Description

cam_periph_ccbwait could return while ccb in progress

In cam_periph_runccb, cam_periph_ccbwait was using the value of the ccb
pinfo.index and status fields to determine whether the ccb was done,
but these fields are updated without a contending lock and could glitch
into states that would be erroneously interpreted as done. Instead,
have cam_periph_ccbwait look for the explicit result of the function
cam_periph_done.

Submitted by: Ryan Libby <rlibby@gmail.com>
Reviewed by: mav
MFC after: 3 weeks
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D8020

Details

Provenance
markjAuthored on
Reviewer
mav
Differential Revision
D8020: cam_periph_ccbwait could return while ccb in progress
Parents
rS306528: Fix `sesutil fault` operation.
Branches
Unknown
Tags
Unknown