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:16 +0000 (17:13 -0400)
commit0147ae6413de42a6f254a17793414c7f25e4f28a
tree7ee6b69615dd2cca47cbc8810543d670e6b0c013
parentc6f05468ac90af73c0077095f5e57f287197e9d8
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.026094 seconds and 4 git commands to generate.