From: Christian Borntraeger <borntraeger@de.ibm.com>
To: pbonzini@redhat.com
Cc: stefanha@gmail.com, Christian Hoff <christian.hoff@de.ibm.com>,
qemu-devel@nongnu.org,
Christian Borntraeger <borntraeger@de.ibm.com>
Subject: [Qemu-devel] [PATCH 1/5] scsi: Fix data length == SCSI_SENSE_BUF_SIZE
Date: Thu, 14 Jun 2012 15:55:25 +0200 [thread overview]
Message-ID: <1339682129-1497-2-git-send-email-borntraeger@de.ibm.com> (raw)
In-Reply-To: <1339682129-1497-1-git-send-email-borntraeger@de.ibm.com>
From: Christian Hoff <christian.hoff@de.ibm.com>
Fix the edge case where the sense data length is exactly the same
as SCSI_SENSE_BUF_SIZE.
This makes SCSI requests work that use all of the available 95 byte
sense data.
Signed-off-by: Christian Hoff <christian.hoff@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
---
hw/scsi-bus.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/hw/scsi-bus.c b/hw/scsi-bus.c
index 64e709e..d1779a2 100644
--- a/hw/scsi-bus.c
+++ b/hw/scsi-bus.c
@@ -1295,7 +1295,7 @@ void scsi_req_complete(SCSIRequest *req, int status)
assert(req->status == -1);
req->status = status;
- assert(req->sense_len < sizeof(req->sense));
+ assert(req->sense_len <= sizeof(req->sense));
if (status == GOOD) {
req->sense_len = 0;
}
--
1.7.0.4
next prev parent reply other threads:[~2012-06-14 13:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-14 13:55 [Qemu-devel] [PATCH 0/5] scsi related fixes Christian Borntraeger
2012-06-14 13:55 ` Christian Borntraeger [this message]
2012-06-14 13:55 ` [Qemu-devel] [PATCH 2/5] scsi: Fix LOAD_UNLOAD Christian Borntraeger
2012-06-14 13:55 ` [Qemu-devel] [PATCH 3/5] scsi: Add basic support for SCSI media changer commands Christian Borntraeger
2012-06-14 13:55 ` [Qemu-devel] [PATCH 4/5] scsi: Fix transfer length for READ POSITION commands Christian Borntraeger
2012-06-14 13:55 ` [Qemu-devel] [PATCH 5/5] scsi: Ensure command and transfer lengths are set for all SCSI stream commands Christian Borntraeger
2012-06-14 14:21 ` Paolo Bonzini
2012-06-14 13:58 ` [Qemu-devel] [PATCH 0/5] scsi related fixes Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1339682129-1497-2-git-send-email-borntraeger@de.ibm.com \
--to=borntraeger@de.ibm.com \
--cc=christian.hoff@de.ibm.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).