virtio_scsi: Fix theoretical use of possibly modified fCCB.
As soon as the lock is released, fCCB may change due to a new Start(). With the current use of the request class this could not happen, so this is purely theoretical. Change-Id: I6caee7f904f1864621aeef088e2bd611eb3b0a1f Reviewed-on: https://review.haiku-os.org/c/haiku/+/1813 Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
This commit is contained in:
parent
85fbdab0a6
commit
26c0b5e701
@ -126,12 +126,13 @@ VirtioSCSIRequest::Finish(bool resubmit)
|
||||
}
|
||||
}
|
||||
|
||||
scsi_ccb *ccb = fCCB;
|
||||
mutex_unlock(&fLock);
|
||||
|
||||
if (resubmit)
|
||||
gSCSI->resubmit(fCCB);
|
||||
gSCSI->resubmit(ccb);
|
||||
else
|
||||
gSCSI->finished(fCCB, 1);
|
||||
gSCSI->finished(ccb, 1);
|
||||
|
||||
TRACE("VirtioSCSIRequest::Finish() done\n");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user