lib: system() is bad, use libkmod instead
For an as of yet unknown reason, calling system("modprobe") from inside
igt/gem_wait causes kasan to spend 1-5 minutes copying the process
pagetables. This evaporates if we replace the fork-happy call to system
with a call to load the module using libkmod. So be it.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
diff --git a/lib/igt_kmod.h b/lib/igt_kmod.h
index 10cd3a2..fd307a4 100644
--- a/lib/igt_kmod.h
+++ b/lib/igt_kmod.h
@@ -26,6 +26,8 @@
#include <libkmod.h>
+#include "igt_aux.h"
+
bool igt_kmod_is_loaded(const char *mod_name);
void igt_kmod_list_loaded(void);