summaryrefslogtreecommitdiffstats
path: root/mm/kfence/kfence_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/kfence/kfence_test.c')
-rw-r--r--mm/kfence/kfence_test.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/mm/kfence/kfence_test.c b/mm/kfence/kfence_test.c
index eb6307c199ea..f1690cf54199 100644
--- a/mm/kfence/kfence_test.c
+++ b/mm/kfence/kfence_test.c
@@ -800,6 +800,9 @@ static int test_init(struct kunit *test)
unsigned long flags;
int i;
+ if (!__kfence_pool)
+ return -EINVAL;
+
spin_lock_irqsave(&observed.lock, flags);
for (i = 0; i < ARRAY_SIZE(observed.lines); i++)
observed.lines[i][0] = '\0';