another fix for "kasan: improve vmalloc tests"
authorAndrey Konovalov <andreyknvl@google.com>
Mon, 28 Feb 2022 23:06:19 +0000 (10:06 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 1 Mar 2022 09:31:46 +0000 (20:31 +1100)
commit3ae90898aa04509faaac4857cc91e33e70c60265
treee4e5a7cf1cde8114c97f250291f55c4e40ae95c6
parent36665216ea6c8a254b944085650ee5ffc8afe646
another fix for "kasan: improve vmalloc tests"

set_memory_rw/ro() are not exported to be used in modules and thus
cannot be used in KUnit-compatible KASAN tests.

Do the checks that rely on these functions only when the tests are
built-in.

Link: https://lkml.kernel.org/r/019ac41602e0c4a7dfe96dc8158a95097c2b2ebd.1645554036.git.andreyknvl@google.com
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Reported-by: kernel test robot <lkp@intel.com>
Reviewed-by: Marco Elver <elver@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
lib/test_kasan.c