* [PATCH] drm/i915/gvt: more locking for ppgtt mm LRU list
@ 2020-02-03 15:07 Igor Druzhinin
2020-02-10 1:43 ` Zhenyu Wang
0 siblings, 1 reply; 2+ messages in thread
From: Igor Druzhinin @ 2020-02-03 15:07 UTC (permalink / raw)
To: linux-kernel, dri-devel, intel-gfx, intel-gvt-dev
Cc: zhenyuw, zhi.a.wang, jani.nikula, joonas.lahtinen, rodrigo.vivi,
airlied, daniel, Igor Druzhinin
When the lock was introduced in 72aabfb862e40 ("drm/i915/gvt: Add mutual
lock for ppgtt mm LRU list") one place got lost.
Signed-off-by: Igor Druzhinin <igor.druzhinin@citrix.com>
---
drivers/gpu/drm/i915/gvt/gtt.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/i915/gvt/gtt.c b/drivers/gpu/drm/i915/gvt/gtt.c
index 34cb404..4a48280 100644
--- a/drivers/gpu/drm/i915/gvt/gtt.c
+++ b/drivers/gpu/drm/i915/gvt/gtt.c
@@ -1956,7 +1956,11 @@ void _intel_vgpu_mm_release(struct kref *mm_ref)
if (mm->type == INTEL_GVT_MM_PPGTT) {
list_del(&mm->ppgtt_mm.list);
+
+ mutex_lock(&mm->vgpu->gvt->gtt.ppgtt_mm_lock);
list_del(&mm->ppgtt_mm.lru_list);
+ mutex_unlock(&mm->vgpu->gvt->gtt.ppgtt_mm_lock);
+
invalidate_ppgtt_mm(mm);
} else {
vfree(mm->ggtt_mm.virtual_ggtt);
--
2.7.4
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] drm/i915/gvt: more locking for ppgtt mm LRU list
2020-02-03 15:07 [PATCH] drm/i915/gvt: more locking for ppgtt mm LRU list Igor Druzhinin
@ 2020-02-10 1:43 ` Zhenyu Wang
0 siblings, 0 replies; 2+ messages in thread
From: Zhenyu Wang @ 2020-02-10 1:43 UTC (permalink / raw)
To: Igor Druzhinin
Cc: linux-kernel, dri-devel, intel-gfx, intel-gvt-dev, airlied,
joonas.lahtinen, jani.nikula, zhenyuw, daniel, rodrigo.vivi,
zhi.a.wang
[-- Attachment #1: Type: text/plain, Size: 1122 bytes --]
On 2020.02.03 15:07:01 +0000, Igor Druzhinin wrote:
> When the lock was introduced in 72aabfb862e40 ("drm/i915/gvt: Add mutual
> lock for ppgtt mm LRU list") one place got lost.
>
> Signed-off-by: Igor Druzhinin <igor.druzhinin@citrix.com>
> ---
> drivers/gpu/drm/i915/gvt/gtt.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/gvt/gtt.c b/drivers/gpu/drm/i915/gvt/gtt.c
> index 34cb404..4a48280 100644
> --- a/drivers/gpu/drm/i915/gvt/gtt.c
> +++ b/drivers/gpu/drm/i915/gvt/gtt.c
> @@ -1956,7 +1956,11 @@ void _intel_vgpu_mm_release(struct kref *mm_ref)
>
> if (mm->type == INTEL_GVT_MM_PPGTT) {
> list_del(&mm->ppgtt_mm.list);
> +
> + mutex_lock(&mm->vgpu->gvt->gtt.ppgtt_mm_lock);
> list_del(&mm->ppgtt_mm.lru_list);
> + mutex_unlock(&mm->vgpu->gvt->gtt.ppgtt_mm_lock);
> +
> invalidate_ppgtt_mm(mm);
> } else {
> vfree(mm->ggtt_mm.virtual_ggtt);
> --
Thanks for the fix!
Reviewed-by: Zhenyu Wang <zhenyuw@linux.intel.com>
--
Open Source Technology Center, Intel ltd.
$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-02-10 1:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-03 15:07 [PATCH] drm/i915/gvt: more locking for ppgtt mm LRU list Igor Druzhinin
2020-02-10 1:43 ` Zhenyu Wang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®