[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] virtio/vhost: do not take address of packed mem
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH] virtio/vhost: do not take address of packed members |
Date: |
Fri, 12 Jan 2018 10:42:09 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 |
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 <address@hidden>
> Signed-off-by: Paolo Bonzini <address@hidden>
> ---
> hw/char/virtio-serial-bus.c | 6 +++---
> hw/virtio/vhost-user.c | 7 +++++--
> 2 files changed, 8 insertions(+), 5 deletions(-)
>
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature