The cpu hotplug notifier needs to be unregistered in the error path of
buffer allocation, else it eventually causes kernel OOPS when the kernel
accesses freed memory of the notifier block.
Fixes #1031
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
}
#ifdef CONFIG_HOTPLUG_CPU
put_online_cpus();
}
#ifdef CONFIG_HOTPLUG_CPU
put_online_cpus();
+ unregister_hotcpu_notifier(&chanb->cpu_hp_notifier);
#endif
free_percpu(chanb->buf);
} else
#endif
free_percpu(chanb->buf);
} else