|
|
|
@ -6085,6 +6085,7 @@ tracing_mark_write(struct file *filp, const char __user *ubuf, |
|
|
|
|
{ |
|
|
|
|
struct trace_array *tr = filp->private_data; |
|
|
|
|
struct ring_buffer_event *event; |
|
|
|
|
struct trace_entry *trace_entry; |
|
|
|
|
struct ring_buffer *buffer; |
|
|
|
|
struct print_entry *entry; |
|
|
|
|
unsigned long irq_flags; |
|
|
|
@ -6122,7 +6123,8 @@ tracing_mark_write(struct file *filp, const char __user *ubuf, |
|
|
|
|
return -EBADF; |
|
|
|
|
|
|
|
|
|
entry = ring_buffer_event_data(event); |
|
|
|
|
entry->ip = _THIS_IP_; |
|
|
|
|
trace_entry = (struct trace_entry *)entry; |
|
|
|
|
entry->ip = trace_entry->pid; |
|
|
|
|
|
|
|
|
|
len = __copy_from_user_inatomic(&entry->buf, ubuf, cnt); |
|
|
|
|
if (len) { |
|
|
|
@ -6136,12 +6138,12 @@ tracing_mark_write(struct file *filp, const char __user *ubuf, |
|
|
|
|
if (entry->buf[cnt - 1] != '\n') { |
|
|
|
|
entry->buf[cnt] = '\n'; |
|
|
|
|
entry->buf[cnt + 1] = '\0'; |
|
|
|
|
stm_log(OST_ENTITY_TRACE_MARKER, entry->buf, cnt + 2); |
|
|
|
|
stm_log(OST_ENTITY_TRACE_MARKER, entry, sizeof(*entry)+cnt + 2); |
|
|
|
|
} else { |
|
|
|
|
entry->buf[cnt] = '\0'; |
|
|
|
|
stm_log(OST_ENTITY_TRACE_MARKER, entry->buf, cnt + 1); |
|
|
|
|
stm_log(OST_ENTITY_TRACE_MARKER, entry, sizeof(*entry)+cnt + 1); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
entry->ip = _THIS_IP_; |
|
|
|
|
__buffer_unlock_commit(buffer, event); |
|
|
|
|
|
|
|
|
|
if (written > 0) |
|
|
|
|