From 1efda8647fb8905cd9fc4b8321bf1ee573e67e07 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Fri, 28 Feb 2014 12:30:04 -0500 Subject: [PATCH] Fix: load state dump even if work-around lookup fails Signed-off-by: Mathieu Desnoyers --- lttng-statedump-impl.c | 9 ++++++++- wrapper/tracepoint.h | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/lttng-statedump-impl.c b/lttng-statedump-impl.c index 35e18a47..a633657a 100755 --- a/lttng-statedump-impl.c +++ b/lttng-statedump-impl.c @@ -426,7 +426,14 @@ EXPORT_SYMBOL_GPL(lttng_statedump_start); static int __init lttng_statedump_init(void) { - return wrapper_lttng_fixup_sig(THIS_MODULE); + /* + * Allow module to load even if the fixup cannot be done. This + * will allow seemless transition when the underlying issue fix + * is merged into the Linux kernel, and when tracepoint.c + * "tracepoint_module_notify" is turned into a static function. + */ + (void) wrapper_lttng_fixup_sig(THIS_MODULE); + return 0; } module_init(lttng_statedump_init); diff --git a/wrapper/tracepoint.h b/wrapper/tracepoint.h index 60b36856..5f429db7 100644 --- a/wrapper/tracepoint.h +++ b/wrapper/tracepoint.h @@ -59,7 +59,7 @@ int wrapper_tracepoint_module_notify(struct notifier_block *nb, if (tracepoint_module_notify_sym) { return tracepoint_module_notify_sym(nb, val, mod); } else { - printk(KERN_WARNING "LTTng: tracepoint_module_notify symbol lookup failed.\n"); + printk(KERN_WARNING "LTTng: tracepoint_module_notify symbol lookup failed. It probably means you kernel don't need this work-around. Please consider upgrading LTTng modules to make this warning go away.\n"); return -ENOSYS; } } -- 2.39.5