OSDN Git Service

scsi: do not overwrite memory on REQUEST SENSE commands with a large buffer
authorPaolo Bonzini <pbonzini@redhat.com>
Sun, 14 Aug 2011 21:05:49 +0000 (14:05 -0700)
committerBlue Swirl <blauwirbel@gmail.com>
Tue, 16 Aug 2011 19:11:51 +0000 (19:11 +0000)
commit8b2a04eeb95212305d3a39170e1c4bc3dbe45e8a
tree383fcc56973c43c7518e99b003c7fb670efe0f3a
parent3b6ffe50300f13240e1b46420ad05da1116df410
scsi: do not overwrite memory on REQUEST SENSE commands with a large buffer

Other scsi_target_reqops commands were careful about not using r->cmd.xfer
directly, and instead always cap it to a fixed length.  This was not done
for REQUEST SENSE, and this patch fixes it.

Reported-by: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
hw/scsi-bus.c