summaryrefslogtreecommitdiffstats
path: root/kernel/kcsan/selftest.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/kcsan/selftest.c')
-rw-r--r--kernel/kcsan/selftest.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/kcsan/selftest.c b/kernel/kcsan/selftest.c
index d98bc208d06d..9014a3a82cf9 100644
--- a/kernel/kcsan/selftest.c
+++ b/kernel/kcsan/selftest.c
@@ -33,6 +33,9 @@ static bool test_encode_decode(void)
unsigned long addr;
prandom_bytes(&addr, sizeof(addr));
+ if (addr < PAGE_SIZE)
+ addr = PAGE_SIZE;
+
if (WARN_ON(!check_encodable(addr, size)))
return false;