projects
/
lttng-modules.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: lttng-tracepoint module notifier should return NOTIFY_OK
[lttng-modules.git]
/
lttng-abi.c
diff --git
a/lttng-abi.c
b/lttng-abi.c
index ab1e832b6ca6d2688a7cace9667615f33d4fe304..223c1ee4a5224ee3c723f1e6eae92c9d328850c7 100644
(file)
--- a/
lttng-abi.c
+++ b/
lttng-abi.c
@@
-56,6
+56,7
@@
#include <lttng-abi-old.h>
#include <lttng-events.h>
#include <lttng-tracer.h>
#include <lttng-abi-old.h>
#include <lttng-events.h>
#include <lttng-tracer.h>
+#include <lttng-tp-mempool.h>
#include <lib/ringbuffer/frontend_types.h>
/*
#include <lib/ringbuffer/frontend_types.h>
/*
@@
-429,8
+430,8
@@
int lttng_abi_create_channel(struct file *session_file,
transport_name = "<unknown>";
break;
}
transport_name = "<unknown>";
break;
}
- if (
atomic_long_add_unless(&session_file->f_count,
- 1, INT_MAX) == INT_MAX) {
+ if (
!atomic_long_add_unless(&session_file->f_count, 1, LONG_MAX)) {
+ ret = -EOVERFLOW;
goto refcount_error;
}
/*
goto refcount_error;
}
/*
@@
-684,6
+685,7
@@
long lttng_metadata_ring_buffer_ioctl(struct file *filp,
*/
return -ENOSYS;
}
*/
return -ENOSYS;
}
+ case RING_BUFFER_FLUSH_EMPTY: /* Fall-through. */
case RING_BUFFER_FLUSH:
{
struct lttng_metadata_stream *stream = filp->private_data;
case RING_BUFFER_FLUSH:
{
struct lttng_metadata_stream *stream = filp->private_data;
@@
-760,6
+762,7
@@
long lttng_metadata_ring_buffer_compat_ioctl(struct file *filp,
*/
return -ENOSYS;
}
*/
return -ENOSYS;
}
+ case RING_BUFFER_FLUSH_EMPTY: /* Fall-through. */
case RING_BUFFER_FLUSH:
{
struct lttng_metadata_stream *stream = filp->private_data;
case RING_BUFFER_FLUSH:
{
struct lttng_metadata_stream *stream = filp->private_data;
@@
-1036,8
+1039,7
@@
int lttng_abi_create_event(struct file *channel_file,
goto file_error;
}
/* The event holds a reference on the channel */
goto file_error;
}
/* The event holds a reference on the channel */
- if (atomic_long_add_unless(&channel_file->f_count,
- 1, INT_MAX) == INT_MAX) {
+ if (!atomic_long_add_unless(&channel_file->f_count, 1, LONG_MAX)) {
ret = -EOVERFLOW;
goto refcount_error;
}
ret = -EOVERFLOW;
goto refcount_error;
}
@@
-1725,6
+1727,12
@@
int __init lttng_abi_init(void)
wrapper_vmalloc_sync_all();
lttng_clock_ref();
wrapper_vmalloc_sync_all();
lttng_clock_ref();
+
+ ret = lttng_tp_mempool_init();
+ if (ret) {
+ goto error;
+ }
+
lttng_proc_dentry = proc_create_data("lttng", S_IRUSR | S_IWUSR, NULL,
<tng_fops, NULL);
lttng_proc_dentry = proc_create_data("lttng", S_IRUSR | S_IWUSR, NULL,
<tng_fops, NULL);
@@
-1737,6
+1745,7
@@
int __init lttng_abi_init(void)
return 0;
error:
return 0;
error:
+ lttng_tp_mempool_destroy();
lttng_clock_unref();
return ret;
}
lttng_clock_unref();
return ret;
}
@@
-1744,6
+1753,7
@@
error:
/* No __exit annotation because used by init error path too. */
void lttng_abi_exit(void)
{
/* No __exit annotation because used by init error path too. */
void lttng_abi_exit(void)
{
+ lttng_tp_mempool_destroy();
lttng_clock_unref();
if (lttng_proc_dentry)
remove_proc_entry("lttng", NULL);
lttng_clock_unref();
if (lttng_proc_dentry)
remove_proc_entry("lttng", NULL);
This page took
0.023915 seconds
and
4
git commands to generate.