Re: [Qemu-devel] [PATCH] scsi: mptsas: infinite loop while fetching requests

2016-06-07 Thread P J P
+-- On Tue, 7 Jun 2016, Paolo Bonzini wrote --+ | > | +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

Re: [Qemu-devel] [PATCH] scsi: mptsas: infinite loop while fetching requests

2016-06-07 Thread Paolo Bonzini
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) > |

Re: [Qemu-devel] [PATCH] scsi: mptsas: infinite loop while fetching requests

2016-06-06 Thread P J P
+-- 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

[Qemu-devel] [PATCH] scsi: mptsas: infinite loop while fetching requests

2016-05-24 Thread P J P
From: Prasad J Pandit The LSI SAS1068 Host Bus Adapter emulator in Qemu, periodically looks for requests and fetches them. A loop doing that in mptsas_fetch_requests() could run infinitely if 's->state' was not operational. Move check to avoid such a loop. Reported-by: Li Qiang Signed-off-by: P