All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philip Yang <Philip.Yang@amd.com>
To: <amd-gfx@lists.freedesktop.org>
Cc: Philip Yang <Philip.Yang@amd.com>,
	felix.kuehling@amd.com, christian.koenig@amd.com
Subject: [PATCH v2 6/7] drm/amdgpu: Use vm status_lock to protect pt free
Date: Mon, 19 Sep 2022 13:15:52 -0400	[thread overview]
Message-ID: <20220919171553.11286-7-Philip.Yang@amd.com> (raw)
In-Reply-To: <20220919171553.11286-1-Philip.Yang@amd.com>

Signed-off-by: Philip Yang <Philip.Yang@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c
index 88de9f0d4728..61a4b7182d44 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c
@@ -637,7 +637,10 @@ static void amdgpu_vm_pt_free(struct amdgpu_vm_bo_base *entry)
 	}
 	ttm_bo_set_bulk_move(&entry->bo->tbo, NULL);
 	entry->bo->vm_bo = NULL;
+
+	spin_lock(&entry->vm->status_lock);
 	list_del(&entry->vm_status);
+	spin_unlock(&entry->vm->status_lock);
 	amdgpu_bo_unref(&entry->bo);
 }
 
-- 
2.35.1


  parent reply	other threads:[~2022-09-19 17:16 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-19 17:15 [PATCH v2 0/7] Fix amdgpu_vm_pt_free warning Philip Yang
2022-09-19 17:15 ` [PATCH v2 1/7] drm/amdgpu: Rename vm invalidate lock to status_lock Philip Yang
2022-09-20 15:21   ` Felix Kuehling
2022-09-19 17:15 ` [PATCH v2 2/7] drm/amdgpu: Use vm status_lock to protect relocated list Philip Yang
2022-09-19 17:15 ` [PATCH v2 3/7] drm/amdgpu: Use vm status_lock to protect vm idle list Philip Yang
2022-09-19 17:15 ` [PATCH v2 4/7] drm/amdgpu: Use vm status_lock to protect vm moved list Philip Yang
2022-09-19 17:15 ` [PATCH v2 5/7] drm/amdgpu: Use vm status_lock to protect vm evicted list Philip Yang
2022-09-19 17:15 ` Philip Yang [this message]
2022-09-19 17:15 ` [PATCH v2 7/7] drm/amdgpu: Fix amdgpu_vm_pt_free warning Philip Yang
2022-09-20 15:17   ` Felix Kuehling
2022-09-20 15:43   ` Christian König

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220919171553.11286-7-Philip.Yang@amd.com \
    --to=philip.yang@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.com \
    --cc=felix.kuehling@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.