[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 5/6] ide: Correct handling of malformed/short PR
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 5/6] ide: Correct handling of malformed/short PRDTs |
Date: |
Mon, 27 Oct 2014 11:06:41 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 |
On 10/02/2014 12:55 AM, John Snow wrote:
> + /* If this is true, you're leaking memory. */
... or qsg is uninitialized, which would work because qemu_sglist_init
initializes all fields.
This is the only comment I have on the series. :)
Paolo
> + assert(qsg->sg == NULL);
> +
> qsg->sg = g_malloc(alloc_hint * sizeof(ScatterGatherEntry));
>
> @@ -1147,7 +1147,7 @@ static int ahci_dma_prepare_buf(IDEDMA *dma, int
> is_write)
> s->io_buffer_size = s->sg.size;
>
> DPRINTF(ad->port_no, "len=%#x\n", s->io_buffer_size);
> - return s->io_buffer_size != 0;
> + return s->io_buffer_size / 512 != 0;
> }
- [Qemu-devel] [PATCH 0/6] AHCI Device Fixes, John Snow, 2014/10/01
- [Qemu-devel] [PATCH 2/6] ahci: Update byte count after DMA completion, John Snow, 2014/10/01
- [Qemu-devel] [PATCH 3/6] ide: repair PIO transfers for cases where nsector > 1, John Snow, 2014/10/01
- [Qemu-devel] [PATCH 4/6] ahci: unify sglist preparation, John Snow, 2014/10/01
- [Qemu-devel] [PATCH 5/6] ide: Correct handling of malformed/short PRDTs, John Snow, 2014/10/01
- Re: [Qemu-devel] [PATCH 5/6] ide: Correct handling of malformed/short PRDTs,
Paolo Bonzini <=
- [Qemu-devel] [PATCH 6/6] ahci: Fix SDB FIS Construction, John Snow, 2014/10/01
- Re: [Qemu-devel] [PATCH 0/6] AHCI Device Fixes, John Snow, 2014/10/16
- Re: [Qemu-devel] [PATCH 0/6] AHCI Device Fixes, Michael S. Tsirkin, 2014/10/25
- Re: [Qemu-devel] [PATCH 0/6] AHCI Device Fixes, Paolo Bonzini, 2014/10/27
- Re: [Qemu-devel] [PATCH 0/6] AHCI Device Fixes, Stefan Hajnoczi, 2014/10/28