Fix: NULL pointer dereference of THIS_MODULE with built-in modules
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Wed, 17 May 2017 21:09:12 +0000 (17:09 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 17 May 2017 21:13:59 +0000 (17:13 -0400)
commit8929785892cc7e8042d514c164e7cde9066af144
treeaeaf63e91305745ebdd35751e624ddbca850f62d
parenteac992672a4466ab1404739b81d4dd49939a3cbd
Fix: NULL pointer dereference of THIS_MODULE with built-in modules

THIS MODULE is defined to 0 when a module is built-in the kernel [1].
This caused NULL pointer dereference when booting a kernel with the
lttng-modules built-in.
To fix this issue, add #if guard around the wrapper_lttng_fixup_sig
function checking if the MODULE macro is defined to confirm that this
piece of code will end up in a module and not in the kernel itself.

[1]: linux/include/linux/export.h:32
Fixes: #1107
Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
wrapper/tracepoint.h
This page took 0.02621 seconds and 4 git commands to generate.