summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-bus/bus-message.c
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2014-09-22 12:49:47 +0200
committerDavid Herrmann <dh.herrmann@gmail.com>2014-09-22 14:27:02 +0200
commit7f3d3ba1a61f28a951ca5fbe59ed15c7ce55219c (patch)
tree9370d82e5ca140322c15e2c70af75c67de64511b /src/libsystemd/sd-bus/bus-message.c
parent95d78c7e7c81a6b788f28c33ef2cafd87471a0d7 (diff)
bus: align kdbus ioctl parameters to 8byte
All kdbus ioctl arguments must be 8byte aligned. Make sure we use alloca_align() and _alignas_(8) in all situations where gcc doesn't guarantee 8-byte alignment. Note that objects on the stack are always 8byte aligned as we put _alignas_(8) into the structure definition in kdbus.h.
Diffstat (limited to 'src/libsystemd/sd-bus/bus-message.c')
-rw-r--r--src/libsystemd/sd-bus/bus-message.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsystemd/sd-bus/bus-message.c b/src/libsystemd/sd-bus/bus-message.c
index 1fa3ad2611..400ba307bc 100644
--- a/src/libsystemd/sd-bus/bus-message.c
+++ b/src/libsystemd/sd-bus/bus-message.c
@@ -128,7 +128,7 @@ static void message_free(sd_bus_message *m) {
message_reset_parts(m);
if (m->release_kdbus) {
- uint64_t off;
+ uint64_t off _alignas_(8);
off = (uint8_t *)m->kdbus - (uint8_t *)m->bus->kdbus_buffer;
ioctl(m->bus->input_fd, KDBUS_CMD_FREE, &off);