qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Cc: Jason Wang <jasowang@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] virtio/vhost: do not take address of packed members
Date: Fri, 12 Jan 2018 10:42:09 -0600	[thread overview]
Message-ID: <3f2a6cb0-f683-7dcb-44aa-f852e3a922fb@redhat.com> (raw)
In-Reply-To: <1515755504-21341-2-git-send-email-pbonzini@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 656 bytes --]

On 01/12/2018 05:11 AM, Paolo Bonzini wrote:
> The address of a packed member is not packed, which may cause accesses
> to unaligned pointers.  Avoid this by reading the packed value before
> passing it to another function.
> 
> Cc: Jason Wang <jasowang@redhat.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  hw/char/virtio-serial-bus.c | 6 +++---
>  hw/virtio/vhost-user.c      | 7 +++++--
>  2 files changed, 8 insertions(+), 5 deletions(-)
> 

Reviewed-by: Eric Blake <eblake@redhat.com>

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 619 bytes --]

      reply	other threads:[~2018-01-12 16:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-12 11:11 [Qemu-devel] [PATCH] virtio/vhost: do not take address of packed members Paolo Bonzini
2018-01-12 16:42 ` Eric Blake [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=3f2a6cb0-f683-7dcb-44aa-f852e3a922fb@redhat.com \
    --to=eblake@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=pbonzini@redhat.com \
    --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 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).