]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
accel/ivpu: Fix race condition when unbinding BOs
authorTomasz Rusinowicz <tomasz.rusinowicz@intel.com>
Wed, 29 Oct 2025 07:14:51 +0000 (08:14 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Dec 2025 13:02:44 +0000 (14:02 +0100)
commitd71333ffdd3707d84cfb95acfaf8ba892adc066b
tree60ea861763d9563660669aa34df8c142aebc91ad
parent48efc0303ac98707e4d8d6308972d18be73f45ff
accel/ivpu: Fix race condition when unbinding BOs

[ Upstream commit 00812636df370bedf4e44a0c81b86ea96bca8628 ]

Fix 'Memory manager not clean during takedown' warning that occurs
when ivpu_gem_bo_free() removes the BO from the BOs list before it
gets unmapped. Then file_priv_unbind() triggers a warning in
drm_mm_takedown() during context teardown.

Protect the unmapping sequence with bo_list_lock to ensure the BO is
always fully unmapped when removed from the list. This ensures the BO
is either fully unmapped at context teardown time or present on the
list and unmapped by file_priv_unbind().

Fixes: 48aea7f2a2ef ("accel/ivpu: Fix locking in ivpu_bo_remove_all_bos_from_context()")
Signed-off-by: Tomasz Rusinowicz <tomasz.rusinowicz@intel.com>
Reviewed-by: Jeff Hugo <jeff.hugo@oss.qualcomm.com>
Signed-off-by: Karol Wachowski <karol.wachowski@linux.intel.com>
Link: https://patch.msgid.link/20251029071451.184243-1-karol.wachowski@linux.intel.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/accel/ivpu/ivpu_gem.c