#include <wrapper/random.h>
#include <wrapper/tracepoint.h>
#include <wrapper/list.h>
+#include <wrapper/types.h>
#include <lttng-kernel-version.h>
#include <lttng-events.h>
#include <lttng-tracer.h>
int i;
mutex_lock(&sessions_mutex);
- session = kzalloc(sizeof(struct lttng_session), GFP_KERNEL);
+ session = lttng_kvzalloc(sizeof(struct lttng_session), GFP_KERNEL);
if (!session)
goto err;
INIT_LIST_HEAD(&session->chan);
err_free_cache:
kfree(metadata_cache);
err_free_session:
- kfree(session);
+ lttng_kvfree(session);
err:
mutex_unlock(&sessions_mutex);
return NULL;
kref_put(&session->metadata_cache->refcount, metadata_cache_destroy);
list_del(&session->list);
mutex_unlock(&sessions_mutex);
- kfree(session);
+ lttng_kvfree(session);
}
int lttng_session_statedump(struct lttng_session *session)
int lttng_match_enabler_star_glob(const char *desc_name,
const char *pattern)
{
- if (!strutils_star_glob_match(pattern, SIZE_MAX, desc_name, SIZE_MAX))
+ if (!strutils_star_glob_match(pattern, LTTNG_SIZE_MAX,
+ desc_name, LTTNG_SIZE_MAX))
return 0;
return 1;
}