mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-20 11:11:24 +00:00
Set CAM_SIM_QUEUED flag before calling ctl_queue() to avoid race.
PR: 194128 Submitted by: Scott M. Ferris <smferris@gmail.com> MFC after: 3 days Sponsored by: EMC/Isilon Storage Division
This commit is contained in:
parent
ab7bf3d49d
commit
204ca472bf
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=272650
@ -609,14 +609,16 @@ cfcs_action(struct cam_sim *sim, union ccb *ccb)
|
||||
bcopy(csio->cdb_io.cdb_bytes, io->scsiio.cdb,
|
||||
io->scsiio.cdb_len);
|
||||
|
||||
ccb->ccb_h.status |= CAM_SIM_QUEUED;
|
||||
err = ctl_queue(io);
|
||||
if (err != CTL_RETVAL_COMPLETE) {
|
||||
printf("%s: func %d: error %d returned by "
|
||||
"ctl_queue()!\n", __func__,
|
||||
ccb->ccb_h.func_code, err);
|
||||
ctl_free_io(io);
|
||||
} else {
|
||||
ccb->ccb_h.status |= CAM_SIM_QUEUED;
|
||||
ccb->ccb_h.status = CAM_REQ_INVALID;
|
||||
xpt_done(ccb);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user