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 942cbc16ad26..b936137f3ec3 100644
--- a/mm/kfence/kfence_test.c
+++ b/mm/kfence/kfence_test.c
@@ -789,6 +789,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';