summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMark Cave-Ayland2021-11-01 19:35:15 +0100
committerPaolo Bonzini2021-11-02 15:57:27 +0100
commitde7e2cb15586a61d26fc3983ba2cbcbc5c234e15 (patch)
tree6f192f6b4cd7936ab89612747715804a303ad771 /scripts
parentKVM: SVM: add migration support for nested TSC scaling (diff)
downloadqemu-de7e2cb15586a61d26fc3983ba2cbcbc5c234e15.tar.gz
qemu-de7e2cb15586a61d26fc3983ba2cbcbc5c234e15.tar.xz
qemu-de7e2cb15586a61d26fc3983ba2cbcbc5c234e15.zip
esp: ensure in-flight SCSI requests are always cancelled
There is currently a check in esp_select() to cancel any in-flight SCSI requests to ensure that issuing multiple select commands without continuing through the rest of the ESP state machine ignores all but the last SCSI request. This is also enforced through the addition of assert()s in esp_transfer_data() and scsi_read_data(). The get_cmd() function does not call esp_select() when TC == 0 which means it is possible for a fuzzer to trigger these assert()s by sending a select command when TC == 0 immediately after a valid SCSI CDB has been submitted. Since esp_select() is only called from get_cmd(), hoist the check to cancel in-flight SCSI requests from esp_select() into get_cmd() to ensure it is always called when executing a select command to initiate a new SCSI request. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Closes: https://gitlab.com/qemu-project/qemu/-/issues/662 Closes: https://gitlab.com/qemu-project/qemu/-/issues/663 Message-Id: <20211101183516.8455-2-mark.cave-ayland@ilande.co.uk> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions