On Fri, 19 Feb 2021 07:53:53 +0200 "Tzvetomir Stoyanov (VMware)" <tz.stoyanov@xxxxxxxxx> wrote: > +/** > + * tracefs_trace_marker_get_fd - Get a file descriptor of "trace_marker" in > + * given instance > + * @instance: ftrace instance, can be NULL for the top instance > + * > + * Returns -1 in case of an error, or a valid file descriptor to "trace_marker" > + * file for reading and writing. The returned FD must be closed with close(). > + */ > +static inline int tracefs_trace_marker_get_fd(struct tracefs_instance *instance) > +{ > + return tracefs_instance_file_open(instance, "trace_marker", O_RDWR); And this should be opened with "O_WRONLY", as trace_marker can't be read. -- Steve > +} > +