repetitive load/unload of ltt-relay-alloc caused null pointer exception because
the cpu hotplug was never unregistered upon exit.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
}
EXPORT_SYMBOL_GPL(ltt_relay_offset_address);
+static struct notifier_block ltt_relay_hotcpu = {
+ .notifier_call = ltt_relay_hotcpu_callback,
+ .priority = 5,
+};
+
static __init int ltt_relay_alloc_init(void)
{
- hotcpu_notifier(ltt_relay_hotcpu_callback, 5);
+ register_cpu_notifier(<t_relay_hotcpu);
ltt_relay_init();
ltt_ascii_init();
return 0;
{
ltt_ascii_exit();
ltt_relay_exit();
+ unregister_cpu_notifier(<t_relay_hotcpu);
}
module_init(ltt_relay_alloc_init);