venus: properly initialize ring monitor initial alive status
authorYiwei Zhang <zzyiwei@chromium.org>
Tue, 28 Nov 2023 20:17:29 +0000 (12:17 -0800)
committerEric Engestrom <eric@engestrom.ch>
Fri, 8 Dec 2023 11:24:46 +0000 (11:24 +0000)
commit4d9ec22da3ccf3ffc1d1da59f63f682ce42fbb8b
tree89eea0e07c71abd7c2f929e600d596b5f670f63e
parent0f6ee029d8787b23721acd4653f6049233b2f8d4
venus: properly initialize ring monitor initial alive status

This avoids a potential race condition if two threads are competing for
the monitor with the initial states, and the losing one may run into
alive status being false and abort.

Fixes: 4a4b05869a6 ("venus: check and configure new ringMonitoring feature")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reported-by: Lina Versace <lina@kiwitree.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26179>
(cherry picked from commit 8ac7d78bf3512aa7575f9c8595494ea592ab2e58)
.pick_status.json
src/virtio/vulkan/vn_common.c
src/virtio/vulkan/vn_instance.c