mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-27 11:58:32 -04:00
selftests/x86/vdso: Fix no-vDSO segfaults
test_vdso would try to call a NULL pointer if the vDSO was missing. vdso_restorer_32 hit a genuine failure: trying to use the kernel-provided signal restorer doesn't work if the vDSO is missing. Skip the test if the vDSO is missing, since the test adds no particular value in that case. Reported-by: kbuild test robot <lkp@intel.com> Signed-off-by: Andy Lutomirski <luto@kernel.org> Signed-off-by: Borislav Petkov <bp@suse.de> Link: https://lkml.kernel.org/r/618ea7b8c55b10d08b1cb139e9a3a957934b8647.1584653439.git.luto@kernel.org
This commit is contained in:
committed by
Borislav Petkov
parent
fb33c6510d
commit
07f24dc95d
@@ -259,6 +259,11 @@ static void test_one_clock_gettime(int clock, const char *name)
|
||||
|
||||
static void test_clock_gettime(void)
|
||||
{
|
||||
if (!vdso_clock_gettime) {
|
||||
printf("[SKIP]\tNo vDSO, so skipping clock_gettime() tests\n");
|
||||
return;
|
||||
}
|
||||
|
||||
for (int clock = 0; clock < sizeof(clocknames) / sizeof(clocknames[0]);
|
||||
clock++) {
|
||||
test_one_clock_gettime(clock, clocknames[clock]);
|
||||
|
||||
Reference in New Issue
Block a user