mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 00:00:11 +01:00
venus: fix unexpected ring alive status expire upon owner thread switch
If the last owner thread has just unset the alive status and released the watchdog, the new owner thread could have acquired to abort unexpectedly if the ownership transfer occurs right before the next owner's warn order. So we must set watchdog alive for new owner so that it can properly check ring alive status in the next warn order. Cc: mesa-stable Acked-by: Dmitry Osipenko <dmitry.osipenko@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34135>
This commit is contained in:
parent
3fb07c5412
commit
8b2703fe08
1 changed files with 4 additions and 0 deletions
|
|
@ -147,6 +147,10 @@ vn_watchdog_acquire(struct vn_watchdog *watchdog, bool alive)
|
|||
mtx_trylock(&watchdog->mutex) == thrd_success) {
|
||||
/* register as the only waiting thread that monitors the ring. */
|
||||
watchdog->tid = tid;
|
||||
/* Always set alive to true for new watchdog owner because the
|
||||
* last owner might have just unset the alive bit before release.
|
||||
*/
|
||||
alive = true;
|
||||
}
|
||||
|
||||
if (tid != watchdog->tid)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue