X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=lttng-events.c;h=e8299b57a3ec8a84d09274a67abe7c0e99609fbe;hb=refs%2Fheads%2Fstable-2.5;hp=e377deb9b4523ea7dfc24169f276f63ecb3b5165;hpb=b02a8b73f7702849eb2ac5f2e567212e040bad07;p=lttng-modules.git diff --git a/lttng-events.c b/lttng-events.c index e377deb9..e8299b57 100644 --- a/lttng-events.c +++ b/lttng-events.c @@ -20,6 +20,12 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +/* + * This page_alloc.h wrapper needs to be included before gfpflags.h because it + * overrides a function with a define. + */ +#include "wrapper/page_alloc.h" + #include #include #include @@ -38,6 +44,7 @@ #include "lttng-events.h" #include "lttng-tracer.h" #include "lttng-abi-old.h" +#include "wrapper/vzalloc.h" #define METADATA_CACHE_DEFAULT_SIZE 4096 @@ -92,7 +99,7 @@ struct lttng_session *lttng_session_create(void) GFP_KERNEL); if (!metadata_cache) goto err_free_session; - metadata_cache->data = vzalloc(METADATA_CACHE_DEFAULT_SIZE); + metadata_cache->data = lttng_vzalloc(METADATA_CACHE_DEFAULT_SIZE); if (!metadata_cache->data) goto err_free_cache; metadata_cache->cache_alloc = METADATA_CACHE_DEFAULT_SIZE; @@ -676,7 +683,7 @@ int lttng_metadata_printf(struct lttng_session *session, tmp_cache_alloc_size = max_t(unsigned int, session->metadata_cache->cache_alloc + len, session->metadata_cache->cache_alloc << 1); - tmp_cache_realloc = vzalloc(tmp_cache_alloc_size); + tmp_cache_realloc = lttng_vzalloc(tmp_cache_alloc_size); if (!tmp_cache_realloc) goto err; if (session->metadata_cache->data) { @@ -1282,7 +1289,9 @@ static int __init lttng_events_init(void) ret = wrapper_lttng_fixup_sig(THIS_MODULE); if (ret) return ret; - + ret = wrapper_get_pfnblock_flags_mask_init(); + if (ret) + return ret; ret = lttng_tracepoint_init(); if (ret) return ret;