From: Stefan Hajnoczi <stefanha@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Kevin Wolf <kwolf@redhat.com>, qemu-devel@nongnu.org, patches@linaro.org
Subject: Re: [Qemu-devel] [PATCH 1/2] dma-helpers: Initialize DMAAIOCB in_cancel flag
Date: Fri, 4 Apr 2014 09:19:11 +0200 [thread overview]
Message-ID: <20140404071911.GA9801@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <1396016569-1913-1-git-send-email-peter.maydell@linaro.org>
On Fri, Mar 28, 2014 at 02:22:49PM +0000, Peter Maydell wrote:
> Initialize the dbs->in_cancel flag in dma_bdrv_io(), since qemu_aio_get()
> does not return zero-initialized memory. Spotted by the clang sanitizer
> (which complained when the value loaded in dma_complete() was not valid
> for a bool type); this might have resulted in leaking the AIO block.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
>
> dma-helpers.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/dma-helpers.c b/dma-helpers.c
> index c9620a5..5f421e9 100644
> --- a/dma-helpers.c
> +++ b/dma-helpers.c
> @@ -213,6 +213,7 @@ BlockDriverAIOCB *dma_bdrv_io(
> dbs->sg_cur_index = 0;
> dbs->sg_cur_byte = 0;
> dbs->dir = dir;
> + dbs->in_cancel = false;
> dbs->io_func = io_func;
> dbs->bh = NULL;
> qemu_iovec_init(&dbs->iov, sg->nsg);
Worth merging for 2.0.
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
next prev parent reply other threads:[~2014-04-04 7:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-28 14:22 [Qemu-devel] [PATCH 1/2] dma-helpers: Initialize DMAAIOCB in_cancel flag Peter Maydell
2014-03-28 14:24 ` Peter Maydell
2014-04-03 14:28 ` Peter Maydell
2014-04-04 7:19 ` Stefan Hajnoczi [this message]
2014-04-04 17:39 ` Kevin Wolf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140404071911.GA9801@stefanha-thinkpad.redhat.com \
--to=stefanha@redhat.com \
--cc=kwolf@redhat.com \
--cc=patches@linaro.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.