chiark / gitweb /
bus: fix memfd-cache regarding memfd offsets
authorDavid Herrmann <dh.herrmann@gmail.com>
Thu, 11 Dec 2014 09:44:41 +0000 (10:44 +0100)
committerDavid Herrmann <dh.herrmann@gmail.com>
Thu, 11 Dec 2014 09:44:41 +0000 (10:44 +0100)
commitbecb1a6e9deabad529c8bc1c90eb7d947505695b
treea4a195939a32ab4de7e05d49b415f48a218938c4
parent1f140dd8b048c5f5599a886b8c4d20f3f1065774
bus: fix memfd-cache regarding memfd offsets

We must restore part->mmap_begin when poping memfds from the memfd-cache.
We rely on the memfds to be unsealed, so we can be sure that we own the
whole FD. Therefore, simply set part->mmap_begin to the same as
part->data.

This fixes test-bus-kernel-benchmark.
src/libsystemd/sd-bus/bus-message.c