VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   33 Branches   55 Tags
author: Marco Elver <elver@google.com> 2021-09-07 19:56:24 -0700 committer: Linus Torvalds <torvalds@linux-foundation.org> 2021-09-08 11:50:24 -0700 commit: c40c6e593bf978e232bae1fab81f4111f2e2c956 parent: 4bbf04aa9aa88ae41205e387d35743a9bf5e933d
Commit Summary:
kfence: test: fail fast if disabled at boot
Diffstat:
1 file 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';