Home
last modified time | relevance | path

Searched hist:"94932 c95c10400acd286fd768a6b411e7ebbec8f" (Results 1 – 1 of 1) sorted by relevance

/qemu/hw/display/
H A Dqxl.c94932c95c10400acd286fd768a6b411e7ebbec8f Fri Apr 12 12:16:26 UTC 2019 Daniel P. Berrangé <berrange@redhat.com> qxl: avoid unaligned pointer reads/writes

The SPICE_RING_PROD_ITEM() macro is initializing a local
'uint64_t *' variable to point to the 'el' field inside
the QXLReleaseRing struct. This uint64_t field is not
guaranteed aligned as the struct is packed.

Code should not take the address of fields within a
packed struct. Changing the SPICE_RING_PROD_ITEM()
macro to avoid taking the address of the field is
impractical. It is clearer to just remove the macro
and inline its functionality in the three call sites
that need it.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20190412121626.19829-6-berrange@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>