kernel: only try to load kernel symbol map once

If we fail, log a message to the console and bail. This seems to happen
with recent kernel changes.
This commit is contained in:
Christian Hergert
2018-01-27 01:09:56 -08:00
parent 51fadf1a5e
commit 0e8b51c6ab

View File

@ -186,8 +186,17 @@ sp_kernel_symbol_from_address (SpCaptureAddress address)
if (G_UNLIKELY (kernel_symbols == NULL))
{
if (!sp_kernel_symbol_load ())
static gboolean failed;
if (failed)
return NULL;
if (!sp_kernel_symbol_load ())
{
g_warning ("Failed to load kernel symbol map, kernel symbols will not be available!");
failed = TRUE;
return NULL;
}
}
g_assert (kernel_symbols != NULL);