qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] scsi: check req pointer before dereferencing it


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH] scsi: check req pointer before dereferencing it
Date: Wed, 19 Mar 2014 08:05:53 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

Il 19/03/2014 02:40, Prasad Joshi ha scritto:
Signed-off-by: Prasad Joshi <address@hidden>
---
 hw/scsi/vmw_pvscsi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/hw/scsi/vmw_pvscsi.c b/hw/scsi/vmw_pvscsi.c
index 7d344b9..e35bff7 100644
--- a/hw/scsi/vmw_pvscsi.c
+++ b/hw/scsi/vmw_pvscsi.c
@@ -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.  */


Reviewed-by: Paolo Bonzini <address@hidden>

will apply it to scsi-next, thanks.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]