tests: add gem_flink_race

This exercises a race in the flink name descruction of the current drm
gem core. When racing a gem close with a gem open the open can sneak
in and cause the kernel to leak the flink name and its reference.

This results in leaked gem objects that won't get reaped even at drm
file close time. On my 2 core/4 threads snb machine this leaks on the
order of 1k objects per second.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
Daniel Vetter
2013-07-23 23:14:57 +02:00
parent 8e46c382e3
commit 7b5440a09a
3 changed files with 118 additions and 0 deletions
+2
View File
@@ -61,6 +61,7 @@ TESTS_progs = \
gem_exec_faulting_reloc \
gem_exec_lut_handle \
gem_fenced_exec_thrash \
gem_flink_race \
gem_gtt_cpu_tlb \
gem_gtt_speed \
gem_hangcheck_forcewake \
@@ -190,6 +191,7 @@ AM_CFLAGS += $(CAIRO_CFLAGS) $(LIBUDEV_CFLAGS) $(GLIB_CFLAGS)
gem_fence_thrash_CFLAGS = $(AM_CFLAGS) $(THREAD_CFLAGS)
gem_fence_thrash_LDADD = $(LDADD) -lpthread
gem_flink_race_LDADD = $(LDADD) -lpthread
gem_threaded_access_tiled_LDADD = $(LDADD) -lpthread
gem_wait_render_timeout_LDADD = $(LDADD) -lrt