[Intel-gfx] [PATCH] drm/i915/selftest: Mark the mock struct file backpointer as invalid
Chris Wilson
chris at chris-wilson.co.uk
Mon Mar 20 13:30:21 UTC 2017
We do not use the struct file backpointer so struct drm_file, so mark it
as invalid when creating a mock file for i915 selftests.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
drivers/gpu/drm/i915/selftests/mock_drm.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/i915/selftests/mock_drm.c b/drivers/gpu/drm/i915/selftests/mock_drm.c
index 113dec05c7dc..8fd1c4ded60f 100644
--- a/drivers/gpu/drm/i915/selftests/mock_drm.c
+++ b/drivers/gpu/drm/i915/selftests/mock_drm.c
@@ -41,6 +41,7 @@ struct drm_file *mock_file(struct drm_i915_private *i915)
return ERR_PTR(err);
file = filp.private_data;
+ memset(&file->filp, POISON_INUSE, sizeof(file->filp));
file->authenticated = true;
return file;
}
--
2.11.0
More information about the Intel-gfx
mailing list