megasas: do not read command more than once from frame
commit36c327a69d723571f02a7691631667cdb1865ee1
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 1 Jun 2017 15:23:13 +0000 (1 17:23 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 15 Jun 2017 09:04:05 +0000 (15 11:04 +0200)
tree8a764c27268aca85dfedec61eed9cfc37398524a
parent5104fac8539eaf155fc6de93e164be43e1e62242
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>
hw/scsi/megasas.c