scsi: avoid an off-by-one error in megasas_mmio_write
commit24dfa9fa2f90a95ac33c7372de4f4f2c8a2c141f
authorPrasad J Pandit <pjp@fedoraproject.org>
Mon, 24 Apr 2017 12:06:34 +0000 (24 17:36 +0530)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 5 May 2017 10:09:59 +0000 (5 12:09 +0200)
treeddaa9601b9d0dc8f87f9d751da403d447e80c9e5
parentaab9e87e7a5d280bfbffaa4ea6e296c515c8dac2
scsi: avoid an off-by-one error in megasas_mmio_write

While reading magic sequence(MFI_SEQ) in megasas_mmio_write,
an off-by-one error could occur as 's->adp_reset' index is not
reset after reading the last sequence.

Reported-by: YY Z <bigbird475958471@gmail.com>
Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
Message-Id: <20170424120634.12268-1-ppandit@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/scsi/megasas.c