Patchwork [regression] qemu-system-arm: segfault in lsi_do_command

login
register
mail settings
Submitter Jonathan Nieder
Date May 16, 2011, 6:35 p.m.
Message ID <20110516183425.GA14103@elie>
Download mbox | patch
Permalink /patch/95800/
State New
Headers show

Comments

Jonathan Nieder - May 16, 2011, 6:35 p.m.
Paolo Bonzini wrote:

> This fixes it on top of my SCSI refactoring series.

Thanks!  Works here, too, for what it's worth.

I squashed the following in when applying the "scsi: introduce
scsi_req_cancel" patch, for easier reading and to get a little closer
to warning-free compilation with gcc 4.6.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
 hw/lsi53c895a.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

Patch

diff --git a/hw/lsi53c895a.c b/hw/lsi53c895a.c
index f291283..43de6f8 100644
--- a/hw/lsi53c895a.c
+++ b/hw/lsi53c895a.c
@@ -889,7 +889,6 @@  static void lsi_do_msgout(LSIState *s)
     uint8_t msg;
     int len;
     uint32_t current_tag;
-    SCSIDevice *current_dev;
     lsi_request *current_req, *p, *p_next;
     int id;
 
@@ -900,8 +899,6 @@  static void lsi_do_msgout(LSIState *s)
         current_tag = s->select_tag;
         current_req = lsi_find_by_tag(s, current_tag);
     }
-    id = (current_tag >> 8) & 0xf;
-    current_dev = s->bus.devs[id];
 
     DPRINTF("MSG out len=%d\n", s->dbc);
     while (s->dbc) {