From 0e8b51c6ab9a204696888bcd20745ffdd6c58429 Mon Sep 17 00:00:00 2001 From: Christian Hergert Date: Sat, 27 Jan 2018 01:09:56 -0800 Subject: [PATCH] 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. --- lib/symbols/sp-kernel-symbol.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/symbols/sp-kernel-symbol.c b/lib/symbols/sp-kernel-symbol.c index 0c893467..894efa09 100644 --- a/lib/symbols/sp-kernel-symbol.c +++ b/lib/symbols/sp-kernel-symbol.c @@ -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);