qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: Stefan Weil <sw@weilnetz.de>
Cc: qemu-trivial@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>,
	qemu-devel <qemu-devel@nongnu.org>,
	Anthony Liguori <aliguori@amazon.com>
Subject: Re: [Qemu-devel] [PATCH] virtio: Remove unneeded memcpy
Date: Fri, 18 Oct 2013 13:03:09 +0200	[thread overview]
Message-ID: <20131018110309.GB15317@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <1382037806-9393-1-git-send-email-sw@weilnetz.de>

On Thu, Oct 17, 2013 at 09:23:26PM +0200, Stefan Weil wrote:
> Report from valgrind:
> 
> ==19521== Source and destination overlap in memcpy(0x31d38938, 0x31d38938, 64)
> ==19521==    at 0x4A0A343: memcpy@@GLIBC_2.14 (in
> /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
> ==19521==    by 0x42774E: virtio_blk_device_init (virtio-blk.c:686)
> ==19521==    by 0x46EE9E: virtio_device_init (virtio.c:1158)
> ==19521==    by 0x25405E: device_realize (qdev.c:178)
> ==19521==    by 0x2559B5: device_set_realized (qdev.c:699)
> ==19521==    by 0x3A819B: property_set_bool (object.c:1315)
> ==19521==    by 0x3A6CE0: object_property_set (object.c:803)
> 
> Valgrind is right: blk == &s->blks, so it is a memcpy of 64 byte with
> source == destination which can be removed.
> 
> Reported-by: Dave Airlie <airlied@gmail.com>
> Signed-off-by: Stefan Weil <sw@weilnetz.de>
> ---
>  hw/block/virtio-blk.c |    1 -
>  1 file changed, 1 deletion(-)

Thanks, applied to my block tree:
https://github.com/stefanha/qemu/commits/block

Stefan

      parent reply	other threads:[~2013-10-18 11:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-17 19:23 [Qemu-devel] [PATCH] virtio: Remove unneeded memcpy Stefan Weil
2013-10-17 20:09 ` Peter Maydell
2013-10-18 11:03 ` Stefan Hajnoczi [this message]

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=20131018110309.GB15317@stefanha-thinkpad.redhat.com \
    --to=stefanha@gmail.com \
    --cc=aliguori@amazon.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=stefanha@redhat.com \
    --cc=sw@weilnetz.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).