X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=probes%2Flttng-kprobes.c;h=daef3600feefd580bb0db79357d09428f8eb21eb;hb=16a9a591f233adc076cc59462f37bd697d952604;hp=9d9fb5b9a759fd6445f70478c907657736f1f082;hpb=89fff18e6246c12f9121721a84ef207f488de8d2;p=lttng-modules.git diff --git a/probes/lttng-kprobes.c b/probes/lttng-kprobes.c index 9d9fb5b9..daef3600 100644 --- a/probes/lttng-kprobes.c +++ b/probes/lttng-kprobes.c @@ -12,6 +12,7 @@ #include #include "../ltt-events.h" #include "../wrapper/ringbuffer/frontend_types.h" +#include "../wrapper/vmalloc.h" #include "../ltt-tracer.h" static @@ -101,6 +102,14 @@ int lttng_kprobes_register(const char *name, event->u.kprobe.symbol_name; event->u.kprobe.kp.offset = offset; event->u.kprobe.kp.addr = (void *) addr; + + /* + * Ensure the memory we just allocated don't trigger page faults. + * Well.. kprobes itself puts the page fault handler on the blacklist, + * but we can never be too careful. + */ + wrapper_vmalloc_sync_all(); + ret = register_kprobe(&event->u.kprobe.kp); if (ret) goto register_error;