[PATCH] drm/i915/selftest: Mark the mock struct file backpointer as invalid

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxx>
---
 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

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux