Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/bonzini/scsi-next' into staging
Browse files Browse the repository at this point in the history
* remotes/bonzini/scsi-next:
  spapr_vscsi: remove duplicate condition check
  scsi: check req pointer before dereferencing it

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
  • Loading branch information
pm215 committed Mar 26, 2014
2 parents 0a87466 + ec8929a commit 61898bc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion hw/scsi/spapr_vscsi.c
Expand Up @@ -690,7 +690,7 @@ static void vscsi_inquiry_no_target(VSCSIState *s, vscsi_req *req)
int rc, len, alen;

/* We dont do EVPD. Also check that page_code is 0 */
if ((cdb[1] & 0x01) || (cdb[1] & 0x01) || cdb[2] != 0) {
if ((cdb[1] & 0x01) || cdb[2] != 0) {
/* Send INVALID FIELD IN CDB */
vscsi_makeup_sense(s, req, ILLEGAL_REQUEST, 0x24, 0);
vscsi_send_rsp(s, req, CHECK_CONDITION, 0, 0);
Expand Down
3 changes: 2 additions & 1 deletion hw/scsi/vmw_pvscsi.c
Expand Up @@ -479,12 +479,13 @@ static void
pvscsi_command_complete(SCSIRequest *req, uint32_t status, size_t resid)
{
PVSCSIRequest *pvscsi_req = req->hba_private;
PVSCSIState *s = pvscsi_req->dev;
PVSCSIState *s;

if (!pvscsi_req) {
trace_pvscsi_command_complete_not_found(req->tag);
return;
}
s = pvscsi_req->dev;

if (resid) {
/* Short transfer. */
Expand Down

0 comments on commit 61898bc

Please sign in to comment.