From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org
Cc: "Christian König" <christian.koenig@amd.com>,
"Alex Deucher" <alexander.deucher@amd.com>,
"Sasha Levin" <sashal@kernel.org>
Subject: [PATCH 6.6.y 1/3] drm/amdgpu: set the VM pointer to NULL in amdgpu_job_prepare
Date: Tue, 22 Sep 2026 21:40:12 -0400 [thread overview]
Message-ID: <20260923014014.880066-1-sashal@kernel.org> (raw)
In-Reply-To: <2026092242-mantis-dragonfly-bdca@gregkh>
From: Christian König <christian.koenig@amd.com>
[ Upstream commit 26c95e838e6301b0230430ec2fadeabfcb07aeda ]
As soon as the prepare phase is completed the VM might be released,
better set it to NULL.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Stable-dep-of: 5155002b03b2 ("drm/amdgpu: fix rmmio iounmap skipped on device removal")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
index 8175d831abd4d..2648ee945ac27 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
@@ -271,6 +271,13 @@ amdgpu_job_prepare_job(struct drm_sched_job *sched_job,
DRM_ERROR("Error getting VM ID (%d)\n", r);
goto error;
}
+ /*
+ * The VM structure might be released after the VMID is
+ * assigned, we had multiple problems with people trying to use
+ * the VM pointer so better set it to NULL.
+ */
+ if (!fence)
+ job->vm = NULL;
}
return fence;
--
2.53.0
next prev parent reply other threads:[~2026-09-23 1:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-22 15:03 FAILED: patch "[PATCH] drm/amdgpu: fix rmmio iounmap skipped on device removal" failed to apply to 6.6-stable tree gregkh
2026-09-23 1:40 ` Sasha Levin [this message]
2026-09-23 1:40 ` [PATCH 6.6.y 2/3] drm/amdgpu: fix warning of drm_mm_clean Sasha Levin
2026-09-23 1:40 ` [PATCH 6.6.y 3/3] drm/amdgpu: fix rmmio iounmap skipped on device removal Sasha Levin
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=20260923014014.880066-1-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=alexander.deucher@amd.com \
--cc=christian.koenig@amd.com \
--cc=stable@vger.kernel.org \
/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.