aboutsummaryrefslogtreecommitdiff
path: root/hw/xtensa
diff options
context:
space:
mode:
authorMaxim Levitsky <mlevitsk@redhat.com>2020-10-06 15:39:04 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2020-10-12 11:50:51 -0400
commit8cfe8013baec2a6f66240ffd767fad2699d85144 (patch)
tree2bc9af125683c19bd30ea479dcbb280d650e4bec /hw/xtensa
parent07a47d4a1879370009baab44f1f387610d88a299 (diff)
downloadqemu-8cfe8013baec2a6f66240ffd767fad2699d85144.zip
qemu-8cfe8013baec2a6f66240ffd767fad2699d85144.tar.gz
qemu-8cfe8013baec2a6f66240ffd767fad2699d85144.tar.bz2
scsi/scsi_bus: fix races in REPORT LUNS
Currently scsi_target_emulate_report_luns iterates over the child device list twice, and there is no guarantee that this list is the same in both iterations. The reason for iterating twice is that the first iteration calculates how much memory to allocate. However if we use a dynamic array we can avoid iterating twice, and therefore we avoid this race. Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1866707 Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Message-Id: <20200913160259.32145-10-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20201006123904.610658-14-mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/xtensa')
0 files changed, 0 insertions, 0 deletions