drm/xe: Fix potential deadlock in __fini_dbm
authorMichal Wajdeczko <michal.wajdeczko@intel.com>
Thu, 11 Jan 2024 18:56:03 +0000 (19:56 +0100)
committerMichal Wajdeczko <michal.wajdeczko@intel.com>
Fri, 12 Jan 2024 10:53:05 +0000 (11:53 +0100)
commit1113e52ffee7b45def230d10edb1f2924c7b3f9e
treeee17b4b7dff644aeed6e09854c8f05fdcd862015
parent33ff1f21bd2fb69620d5ffc7afccf74cbc403097
drm/xe: Fix potential deadlock in __fini_dbm

If Doorbell Manager is in unclean state during fini phase, for
debug purposes we try to print it's state, but we missed the fact
that we are already holding a lock so the xe_guc_db_mgr_print()
will deadlock since it also attempts to grab the same lock.

Fixes: 587c73343ac7 ("drm/xe: Introduce GuC Doorbells Manager")
Cc: Piotr PiĆ³rkowski <piotr.piorkowski@intel.com>
Reviewed-by: Piotr PiĆ³rkowski <piotr.piorkowski@intel.com>
Link: https://lore.kernel.org/r/20240111185603.673-1-michal.wajdeczko@intel.com
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
drivers/gpu/drm/xe/xe_guc_db_mgr.c