scsi-generic: Remove bogus double complete
commit40f16dd1279e7f26357b3c4b3838a89ffc6153da
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 3 May 2011 12:15:59 +0000 (3 14:15 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 26 May 2011 10:14:14 +0000 (26 12:14 +0200)
tree6c7921a74527c535f30d305da0c34663eda18a33
parent5138efecf23471abcf7dedce1956918f4ba312e3
scsi-generic: Remove bogus double complete

scsi-generic scsi_read_complete() should not -both- call the client
complete callback with SCSI_REASON_DATA -and- call
scsi_command_complete().  The former will cause the client to queue a
new read or write request, while the later will free the request data
structure, thus causing the new read or write request to use a
freed/stale structure when it completes.

This patch fixes the bug, fixing a crash with scsi-generic & RHEL5.5
installer.

Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
hw/scsi-generic.c