mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-15 14:56:13 +01:00
Close a race condition that doesn't really exist in -current. When
a resource shortage occurs, freeze our queue and then set the resource shortage flag while the controller data structure is locked. The old code did these in the wrong order potentially allowing our interrupt handler to release the queue and clear the flag before the freeze ever occurred.
This commit is contained in:
parent
8576ccb74b
commit
b00aeda6f0
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=66891
@ -433,9 +433,9 @@ ahc_action(struct cam_sim *sim, union ccb *ccb)
|
||||
ahc_lock(ahc, &s);
|
||||
if ((scb = ahc_get_scb(ahc)) == NULL) {
|
||||
|
||||
xpt_freeze_simq(sim, /*count*/1);
|
||||
ahc->flags |= AHC_RESOURCE_SHORTAGE;
|
||||
ahc_unlock(ahc, &s);
|
||||
xpt_freeze_simq(sim, /*count*/1);
|
||||
ccb->ccb_h.status = CAM_REQUEUE_REQ;
|
||||
xpt_done(ccb);
|
||||
return;
|
||||
|
@ -433,9 +433,9 @@ ahc_action(struct cam_sim *sim, union ccb *ccb)
|
||||
ahc_lock(ahc, &s);
|
||||
if ((scb = ahc_get_scb(ahc)) == NULL) {
|
||||
|
||||
xpt_freeze_simq(sim, /*count*/1);
|
||||
ahc->flags |= AHC_RESOURCE_SHORTAGE;
|
||||
ahc_unlock(ahc, &s);
|
||||
xpt_freeze_simq(sim, /*count*/1);
|
||||
ccb->ccb_h.status = CAM_REQUEUE_REQ;
|
||||
xpt_done(ccb);
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user