
On Thu, Nov 18, 2021 at 17:33:34 +0100, Peter Krempa wrote:
The main reason is to ensure that the private data are properly allocated for every instance.
Signed-off-by: Peter Krempa <pkrempa@redhat.com> --- src/conf/domain_audit.c | 2 +- src/conf/domain_conf.c | 17 ++++++++++------- src/conf/domain_conf.h | 2 +- src/qemu/qemu_command.c | 2 +- src/qemu/qemu_domain.c | 6 +++--- src/qemu/qemu_hotplug.c | 2 +- 6 files changed, 17 insertions(+), 14 deletions(-)
[...]
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index ab9a7d66f8..3cb68c5d0a 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -1997,7 +1997,7 @@ struct _virDomainShmemDef { virDomainShmemRole role; struct { bool enabled; - virDomainChrSourceDef chr; + virDomainChrSourceDef *chr; } server; struct { bool enabled;
Apparently I've misplaced my hack to build the apparmor security driver on my dev box, so the following diff is needed to build properly: diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c index 218e07bfb0..b7ffb5e2c3 100644 --- a/src/security/virt-aa-helper.c +++ b/src/security/virt-aa-helper.c @@ -1172,8 +1172,8 @@ get_files(vahControl * ctl) * When the server path is enabled, use it - otherwise fallback to * model dependent defaults. */ if (shmem->server.enabled && - shmem->server.chr.data.nix.path) { - if (vah_add_file(&buf, shmem->server.chr.data.nix.path, + shmem->server.chr->data.nix.path) { + if (vah_add_file(&buf, shmem->server.chr->data.nix.path, "rw") != 0) goto cleanup; } else {