Re: WARNING: AMDGPU DRM warning in 5.11.9
From: Ilkka Prusi
Date: Thu Mar 25 2021 - 02:05:01 EST
On 24.3.2021 16.16, Chris Rankin wrote:
Hi,
Theee warnings ares not present in my dmesg log from 5.11.8:
[ 43.390159] ------------[ cut here ]------------
[ 43.393574] WARNING: CPU: 2 PID: 1268 at
drivers/gpu/drm/ttm/ttm_bo.c:517 ttm_bo_release+0x172/0x282 [ttm]
[ 43.401940] Modules linked in: nf_nat_ftp nf_conntrack_ftp cfg80211
Changing WARN_ON to WARN_ON_ONCE in drivers/gpu/drm/ttm/ttm_bo.c
ttm_bo_release() reduces the flood of messages into single splat.
This warning appears to come from 57fcd550eb15bce ("drm/ttm: Warn on
pinning without holding a reference)" and reverting it might be one choice.
There are others, but I am assuming there is a common cause here.
Cheers,
Chris
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
index a76eb2c14e8c..50b53355b265 100644
--- a/drivers/gpu/drm/ttm/ttm_bo.c
+++ b/drivers/gpu/drm/ttm/ttm_bo.c
@@ -514,7 +514,7 @@ static void ttm_bo_release(struct kref *kref)
* shrinkers, now that they are queued for
* destruction.
*/
- if (WARN_ON(bo->pin_count)) {
+ if (WARN_ON_ONCE(bo->pin_count)) {
bo->pin_count = 0;
ttm_bo_del_from_lru(bo);
ttm_bo_add_mem_to_lru(bo, &bo->mem);
--
- Ilkka