From: Mathieu Desnoyers Date: Wed, 11 May 2011 04:46:12 +0000 (-0400) Subject: Add explicit vmalloc_sync_all X-Git-Tag: v2.0-pre1~167 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=a509e13364a2d024a2ae2acbeee3ac4ac2634842;p=lttng-modules.git Add explicit vmalloc_sync_all Signed-off-by: Mathieu Desnoyers --- diff --git a/Makefile b/Makefile index 2549f1d1..ac8618de 100644 --- a/Makefile +++ b/Makefile @@ -5,13 +5,12 @@ ifneq ($(KERNELRELEASE),) ifneq ($(CONFIG_TRACEPOINTS),) -obj-m += ltt-core.o obj-m += ltt-ring-buffer-client-discard.o obj-m += ltt-ring-buffer-client-overwrite.o obj-m += ltt-relay.o ltt-relay-objs := ltt-events.o ltt-event-header.o ltt-debugfs-abi.o \ - ltt-probes.o + ltt-probes.o ltt-core.o obj-m += probes/ diff --git a/ltt-debugfs-abi.c b/ltt-debugfs-abi.c index f9f5bedf..2f200ed1 100644 --- a/ltt-debugfs-abi.c +++ b/ltt-debugfs-abi.c @@ -28,6 +28,7 @@ #include #include #include +#include /* For vmalloc_sync_all */ #include "wrapper/ringbuffer/vfs.h" #include "ltt-debugfs-abi.h" #include "ltt-events.h" @@ -537,6 +538,7 @@ int __init ltt_debugfs_abi_init(void) { int ret = 0; + vmalloc_sync_all(); lttng_dentry = debugfs_create_file("lttng", S_IWUSR, NULL, NULL, <tng_fops); if (IS_ERR(lttng_dentry) || !lttng_dentry) { diff --git a/ltt-ring-buffer-client.h b/ltt-ring-buffer-client.h index 5ce710ce..e889c571 100644 --- a/ltt-ring-buffer-client.h +++ b/ltt-ring-buffer-client.h @@ -10,6 +10,7 @@ #include #include +#include /* for vmalloc_sync_all */ #include "wrapper/trace-clock.h" #include "ltt-events.h" #include "ltt-tracer.h" @@ -198,6 +199,11 @@ static struct ltt_transport ltt_relay_transport = { static int __init ltt_ring_buffer_client_init(void) { + /* + * This vmalloc sync all also takes care of the lib ring buffer + * vmalloc'd module pages when it is built as a module into LTTng. + */ + vmalloc_sync_all(); printk(KERN_INFO "LTT : ltt ring buffer client init\n"); ltt_transport_register(<t_relay_transport); return 0; diff --git a/probes/lttng-events.h b/probes/lttng-events.h index b6109f2f..38c61cd8 100644 --- a/probes/lttng-events.h +++ b/probes/lttng-events.h @@ -1,6 +1,7 @@ #include #include #include +#include /* for vmalloc_sync_all() */ #include "../wrapper/ringbuffer/frontend_types.h" #include "../ltt-events.h" #include "../ltt-tracer-core.h" @@ -572,6 +573,7 @@ static int TP_ID(__lttng_events_init__, TRACE_SYSTEM)(void) int ret; int i; + vmalloc_sync_all(); ret = TP_ID(__lttng_types_init__, TRACE_SYSTEM)(); if (ret) return ret; diff --git a/probes/lttng-types.c b/probes/lttng-types.c index c88d4735..a4b40cf7 100644 --- a/probes/lttng-types.c +++ b/probes/lttng-types.c @@ -11,6 +11,7 @@ #include #include /* tid_t */ #include +#include /* for vmalloc_sync_all */ #include "lttng-types.h" struct dentry *lttng_types_dentry; @@ -185,6 +186,7 @@ static int lttng_types_init(void) { int ret = 0; + vmalloc_sync_all(); lttng_types_dentry = debugfs_create_file("lttng-types", S_IWUSR, NULL, NULL, <tng_types_fops); if (IS_ERR(lttng_types_dentry) || !lttng_types_dentry) {