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:50 +0000 (17:13 -0400)
commita9799a5121562e2e5fa8f31b01151f195efc92fc
tree7ee6b69615dd2cca47cbc8810543d670e6b0c013
parente1cdd6e9b490108e3810e9223799c2c7acbc9622
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.027968 seconds and 4 git commands to generate.