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:55 +0000 (17:13 -0400)
commit85abc967ae740e2140758a1eb8f66095f045b315
tree74a51e2766e7919e5bfd8e8d7cf78123510a77d4
parent67e891fbe09d8bf262c8aefe15467446a20721db
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.02527 seconds and 4 git commands to generate.