summaryrefslogtreecommitdiff
path: root/tests/i915/gem_pread.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2020-11-07 20:16:10 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2020-11-07 20:16:49 +0000
commitbd66a0f80e10f055d081960a5e00b073542d6c7a (patch)
tree61d995b522e01cb16d955f4dd8731c233d39f76c /tests/i915/gem_pread.c
parentfd78d680ad4eeaea2065ce4cd3626427f3f89dda (diff)
i915/gem_pread: Set threads = NULL before realloc
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Matthew Auld <matthew.auld@intel.com>
Diffstat (limited to 'tests/i915/gem_pread.c')
-rw-r--r--tests/i915/gem_pread.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/i915/gem_pread.c b/tests/i915/gem_pread.c
index ad3a068b..58a21457 100644
--- a/tests/i915/gem_pread.c
+++ b/tests/i915/gem_pread.c
@@ -160,9 +160,9 @@ static void test_exhaustion(int i915)
.i915 = i915,
.vgem = drm_open_driver(DRIVER_VGEM),
};
+ pthread_t *thread = NULL;
struct uffd_msg msg;
unsigned long count;
- pthread_t *thread;
char buf[4096];
int ufd;
@@ -173,7 +173,6 @@ static void test_exhaustion(int i915)
igt_require_f(ioctl(ufd, UFFDIO_API, &api) == 0 && api.api == UFFD_API,
"userfaultfd API v%lld:%lld\n", UFFD_API, api.api);
-
t.page = mmap(NULL, 4096, PROT_WRITE, MAP_SHARED | MAP_ANON, 0, 0);
igt_assert(t.page != MAP_FAILED);