[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1573033994-17102-1-git-send-email-bianpan2016@163.com>
Date: Wed, 6 Nov 2019 17:53:14 +0800
From: Pan Bian <bianpan2016@....com>
To: Alex Deucher <alexander.deucher@....com>, christian.koenig@....com,
David1.Zhou@....com, David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>,
Sam Ravnborg <sam@...nborg.org>
Cc: amd-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org, Pan Bian <bianpan2016@....com>
Subject: [PATCH] drm/amdgpu: fix double reference dropping
After dropping the reference of object fence in the loop, it should be
set to NULL to protecting dropping its reference again outside the loop.
Signed-off-by: Pan Bian <bianpan2016@....com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c
index 649e68c4479b..3174093f35f3 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c
@@ -47,6 +47,7 @@ static int amdgpu_benchmark_do_move(struct amdgpu_device *adev, unsigned size,
if (r)
goto exit_do_move;
dma_fence_put(fence);
+ fence = NULL;
}
end_jiffies = jiffies;
r = jiffies_to_msecs(end_jiffies - start_jiffies);
--
2.7.4
Powered by blists - more mailing lists