Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NwFFA-0000UH-60 for qemu-devel@nongnu.org; Mon, 29 Mar 2010 09:43:04 -0400 Received: from [140.186.70.92] (port=32960 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NwFF8-0000SP-T7 for qemu-devel@nongnu.org; Mon, 29 Mar 2010 09:43:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NwFF7-0002Eh-NT for qemu-devel@nongnu.org; Mon, 29 Mar 2010 09:43:02 -0400 Received: from mx1.redhat.com ([209.132.183.28]:11382) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NwFF7-0002Ed-Ee for qemu-devel@nongnu.org; Mon, 29 Mar 2010 09:43:01 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o2TDh0Of022419 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 29 Mar 2010 09:43:00 -0400 From: Gerd Hoffmann Date: Mon, 29 Mar 2010 15:42:57 +0200 Message-Id: <1269870177-31797-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH] lsi: fix segfault in lsi_command_complete List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann Signed-off-by: Gerd Hoffmann --- hw/lsi53c895a.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/lsi53c895a.c b/hw/lsi53c895a.c index a332401..525f3ca 100644 --- a/hw/lsi53c895a.c +++ b/hw/lsi53c895a.c @@ -679,7 +679,7 @@ static void lsi_command_complete(SCSIBus *bus, int reason, uint32_t tag, return; } - if (s->waiting == 1 || tag != s->current->tag || + if (s->waiting == 1 || !s->current || tag != s->current->tag || (lsi_irq_on_rsl(s) && !(s->scntl1 & LSI_SCNTL1_CON))) { if (lsi_queue_tag(s, tag, arg)) return; -- 1.6.6.1