All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] scsi: check req pointer before dereferencing it
@ 2014-03-19  1:40 Prasad Joshi
  2014-03-19  7:05 ` Paolo Bonzini
  0 siblings, 1 reply; 2+ messages in thread
From: Prasad Joshi @ 2014-03-19  1:40 UTC (permalink / raw)
  To: prasadjoshi.linux, qemu-devel; +Cc: pbonzini

Signed-off-by: Prasad Joshi <prasadjoshi.linux@gmail.com>
---
 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.  */
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH] scsi: check req pointer before dereferencing it
  2014-03-19  1:40 [Qemu-devel] [PATCH] scsi: check req pointer before dereferencing it Prasad Joshi
@ 2014-03-19  7:05 ` Paolo Bonzini
  0 siblings, 0 replies; 2+ messages in thread
From: Paolo Bonzini @ 2014-03-19  7:05 UTC (permalink / raw)
  To: Prasad Joshi, qemu-devel

Il 19/03/2014 02:40, Prasad Joshi ha scritto:
> Signed-off-by: Prasad Joshi <prasadjoshi.linux@gmail.com>
> ---
>  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 <pbonzini@redhat.com>

will apply it to scsi-next, thanks.

Paolo

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-03-19  7:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-19  1:40 [Qemu-devel] [PATCH] scsi: check req pointer before dereferencing it Prasad Joshi
2014-03-19  7:05 ` Paolo Bonzini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.