projects
/
lttng-modules.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Build fix: arm64: incomplete landlock_rule_type type
[lttng-modules.git]
/
src
/
lttng-abi.c
diff --git
a/src/lttng-abi.c
b/src/lttng-abi.c
index c3e676902d787fe88c84d0ef034930f169cd4372..caec803fe51e018f470ce03bb7003fbbaa73517f 100644
(file)
--- a/
src/lttng-abi.c
+++ b/
src/lttng-abi.c
@@
-23,6
+23,7
@@
* - Takes instrumentation source specific arguments.
*/
* - Takes instrumentation source specific arguments.
*/
+#include <asm/barrier.h>
#include <linux/module.h>
#include <linux/proc_fs.h>
#include <linux/anon_inodes.h>
#include <linux/module.h>
#include <linux/proc_fs.h>
#include <linux/anon_inodes.h>
@@
-36,9
+37,7
@@
#include <ringbuffer/frontend.h>
#include <wrapper/compiler_attributes.h>
#include <wrapper/poll.h>
#include <ringbuffer/frontend.h>
#include <wrapper/compiler_attributes.h>
#include <wrapper/poll.h>
-#include <wrapper/file.h>
#include <wrapper/kref.h>
#include <wrapper/kref.h>
-#include <wrapper/barrier.h>
#include <lttng/string-utils.h>
#include <lttng/abi.h>
#include <lttng/abi-old.h>
#include <lttng/string-utils.h>
#include <lttng/abi.h>
#include <lttng/abi-old.h>
@@
-99,7
+98,7
@@
int lttng_abi_create_session(void)
session = lttng_session_create();
if (!session)
return -ENOMEM;
session = lttng_session_create();
if (!session)
return -ENOMEM;
- session_fd =
lttng_get_unused_fd(
);
+ session_fd =
get_unused_fd_flags(0
);
if (session_fd < 0) {
ret = session_fd;
goto fd_error;
if (session_fd < 0) {
ret = session_fd;
goto fd_error;
@@
-141,7
+140,7
@@
int lttng_abi_create_event_notifier_group(void)
if (!event_notifier_group)
return -ENOMEM;
if (!event_notifier_group)
return -ENOMEM;
- event_notifier_group_fd =
lttng_get_unused_fd(
);
+ event_notifier_group_fd =
get_unused_fd_flags(0
);
if (event_notifier_group_fd < 0) {
ret = event_notifier_group_fd;
goto fd_error;
if (event_notifier_group_fd < 0) {
ret = event_notifier_group_fd;
goto fd_error;
@@
-174,7
+173,7
@@
int lttng_abi_tracepoint_list(void)
struct file *tracepoint_list_file;
int file_fd, ret;
struct file *tracepoint_list_file;
int file_fd, ret;
- file_fd =
lttng_get_unused_fd(
);
+ file_fd =
get_unused_fd_flags(0
);
if (file_fd < 0) {
ret = file_fd;
goto fd_error;
if (file_fd < 0) {
ret = file_fd;
goto fd_error;
@@
-214,7
+213,7
@@
int lttng_abi_syscall_list(void)
struct file *syscall_list_file;
int file_fd, ret;
struct file *syscall_list_file;
int file_fd, ret;
- file_fd =
lttng_get_unused_fd(
);
+ file_fd =
get_unused_fd_flags(0
);
if (file_fd < 0) {
ret = file_fd;
goto fd_error;
if (file_fd < 0) {
ret = file_fd;
goto fd_error;
@@
-497,7
+496,7
@@
int lttng_abi_create_channel(struct file *session_file,
int chan_fd;
int ret = 0;
int chan_fd;
int ret = 0;
- chan_fd =
lttng_get_unused_fd(
);
+ chan_fd =
get_unused_fd_flags(0
);
if (chan_fd < 0) {
ret = chan_fd;
goto fd_error;
if (chan_fd < 0) {
ret = chan_fd;
goto fd_error;
@@
-1016,7
+1015,7
@@
ssize_t lttng_event_notifier_group_notif_read(struct file *filp, char __user *us
/* Finish copy of previous record */
if (*ppos != 0) {
/* Finish copy of previous record */
if (*ppos != 0) {
- if (
read_count < count
) {
+ if (
count != 0
) {
len = chan->iter.len_left;
read_offset = *ppos;
goto skip_get_next;
len = chan->iter.len_left;
read_offset = *ppos;
goto skip_get_next;
@@
-1096,7
+1095,8
@@
nodata:
chan->iter.len_left = 0;
put_record:
chan->iter.len_left = 0;
put_record:
- lib_ring_buffer_put_current_record(buf);
+ if (*ppos == 0)
+ lib_ring_buffer_put_current_record(buf);
return read_count;
}
return read_count;
}
@@
-1602,7
+1602,7
@@
int lttng_abi_create_stream_fd(struct file *channel_file, void *stream_priv,
int stream_fd, ret;
struct file *stream_file;
int stream_fd, ret;
struct file *stream_file;
- stream_fd =
lttng_get_unused_fd(
);
+ stream_fd =
get_unused_fd_flags(0
);
if (stream_fd < 0) {
ret = stream_fd;
goto fd_error;
if (stream_fd < 0) {
ret = stream_fd;
goto fd_error;
@@
-1867,7
+1867,7
@@
int lttng_abi_create_event(struct file *channel_file,
return -EINVAL;
}
return -EINVAL;
}
- event_fd =
lttng_get_unused_fd(
);
+ event_fd =
get_unused_fd_flags(0
);
if (event_fd < 0) {
ret = event_fd;
goto fd_error;
if (event_fd < 0) {
ret = event_fd;
goto fd_error;
@@
-2101,7
+2101,7
@@
int lttng_abi_create_event_notifier(struct file *event_notifier_group_file,
event_notifier_param->event.name[LTTNG_KERNEL_ABI_SYM_NAME_LEN - 1] = '\0';
event_notifier_param->event.name[LTTNG_KERNEL_ABI_SYM_NAME_LEN - 1] = '\0';
- event_notifier_fd =
lttng_get_unused_fd(
);
+ event_notifier_fd =
get_unused_fd_flags(0
);
if (event_notifier_fd < 0) {
ret = event_notifier_fd;
goto fd_error;
if (event_notifier_fd < 0) {
ret = event_notifier_fd;
goto fd_error;
@@
-2248,7
+2248,7
@@
long lttng_abi_event_notifier_group_create_error_counter(
goto fd_error;
}
goto fd_error;
}
- counter_fd =
lttng_get_unused_fd(
);
+ counter_fd =
get_unused_fd_flags(0
);
if (counter_fd < 0) {
ret = counter_fd;
goto fd_error;
if (counter_fd < 0) {
ret = counter_fd;
goto fd_error;
@@
-2282,7
+2282,7
@@
long lttng_abi_event_notifier_group_create_error_counter(
* in record_error. Ensures the counter is created and the
* error_counter_len is set before they are used.
*/
* in record_error. Ensures the counter is created and the
* error_counter_len is set before they are used.
*/
-
lttng_
smp_store_release(&event_notifier_group->error_counter, counter);
+ smp_store_release(&event_notifier_group->error_counter, counter);
counter->file = counter_file;
counter->owner = event_notifier_group->file;
counter->file = counter_file;
counter->owner = event_notifier_group->file;
This page took
0.026219 seconds
and
4
git commands to generate.