]> git.proxmox.com Git - mirror_qemu.git/commit
megasas: do not read command more than once from frame
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 1 Jun 2017 15:23:13 +0000 (17:23 +0200)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Thu, 31 Aug 2017 16:51:16 +0000 (11:51 -0500)
commit578fb5003f4f86d332c8ec7584d1f586ba58b0f8
treebdb0ae95d72bc8478437fb285211a5cbeb2322b8
parent50b93533153b1e49aa26e289a49d3c9773e189f5
megasas: do not read command more than once from frame

Avoid TOC-TOU bugs by passing the frame_cmd down, and checking
cmd->dcmd_opcode instead of cmd->frame->header.frame_cmd.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit 36c327a69d723571f02a7691631667cdb1865ee1)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/scsi/megasas.c