]> git.proxmox.com Git - mirror_qemu.git/commit
vl: defuse PID file path resolve error
authorFiona Ebner <f.ebner@proxmox.com>
Mon, 31 Oct 2022 09:47:16 +0000 (10:47 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 15 Mar 2023 10:52:25 +0000 (11:52 +0100)
commitdee2a4d4d2f6adc3c664e37a559d4187deee4818
treecb60bbd5b21d1031dfb04c2244164af2863e7a2b
parent54ad31fb0a0a54d3564f74a0e8dc8ef2b70d5611
vl: defuse PID file path resolve error

Commit 85c4bf8aa6 ("vl: Unlink absolute PID file path") introduced a
critical error when the PID file path cannot be resolved. Before this
commit, it was possible to invoke QEMU when the PID file was a file
created with mkstemp that was already unlinked at the time of the
invocation. There might be other similar scenarios.

It should not be a critical error when the PID file unlink notifier
can't be registered, because the path can't be resolved. If the file
is already gone from QEMU's perspective, silently ignore the error.
Otherwise, only print a warning.

Fixes: 85c4bf8aa6 ("vl: Unlink absolute PID file path")
Reported-by: Dominik Csapak <d.csapak@proxmox.com>
Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Reviewed-by: Hanna Reitz <hreitz@redhat.com>
Message-Id: <20221031094716.39786-1-f.ebner@proxmox.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
softmmu/vl.c