From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55785) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bABpP-0004Kv-Jx for qemu-devel@nongnu.org; Tue, 07 Jun 2016 03:53:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bABpL-00064D-Co for qemu-devel@nongnu.org; Tue, 07 Jun 2016 03:53:34 -0400 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]:35687) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bABpL-00063U-56 for qemu-devel@nongnu.org; Tue, 07 Jun 2016 03:53:31 -0400 Received: by mail-wm0-x244.google.com with SMTP id k184so15503283wme.2 for ; Tue, 07 Jun 2016 00:53:30 -0700 (PDT) Sender: Paolo Bonzini References: <1464077264-25473-1-git-send-email-ppandit@redhat.com> From: Paolo Bonzini Message-ID: <91ef3a7e-d1d4-87a7-f3c5-28a1ff784b2a@redhat.com> Date: Tue, 7 Jun 2016 09:53:25 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] scsi: mptsas: infinite loop while fetching requests List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: P J P , Qemu Developers Cc: Li Qiang , Hannes Reinecke , Alexander Graf On 07/06/2016 08:42, P J P wrote: > +-- On Tue, 24 May 2016, P J P wrote --+ > | diff --git a/hw/scsi/mptsas.c b/hw/scsi/mptsas.c > | index 499c146..be88e16 100644 > | --- a/hw/scsi/mptsas.c > | +++ b/hw/scsi/mptsas.c > | @@ -754,11 +754,6 @@ static void mptsas_fetch_request(MPTSASState *s) > | hwaddr addr; > | int size; > | > | - if (s->state != MPI_IOC_STATE_OPERATIONAL) { > | - mptsas_set_fault(s, MPI_IOCSTATUS_INVALID_STATE); > | - return; > | - } > | - > | /* Read the message header from the guest first. */ > | addr = s->host_mfa_high_addr | MPTSAS_FIFO_GET(s, request_post); > | pci_dma_read(pci, addr, req, sizeof(hdr)); > | @@ -789,6 +784,10 @@ static void mptsas_fetch_requests(void *opaque) > | { > | MPTSASState *s = opaque; > | > | + if (s->state != MPI_IOC_STATE_OPERATIONAL) { > | + mptsas_set_fault(s, MPI_IOCSTATUS_INVALID_STATE); > | + return; > | + } > | while (!MPTSAS_FIFO_EMPTY(s, request_post)) { > | mptsas_fetch_request(s); > | } > > Ping..! > -- > Prasad J Pandit / Red Hat Product Security Team > 47AF CE69 3A90 54AA 9045 1053 DD13 3D32 FE5B 041F > > This is commit 06630554ccbdd25780aa03c3548aaff1eb56dffd. Paolo