diff options
-rw-r--r-- | kernel/trace/trace.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 70f94fa92c10..c56fc5e60133 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c | |||
@@ -770,11 +770,6 @@ trace_entry_idx(struct trace_array *tr, struct trace_array_cpu *data, | |||
770 | 770 | ||
771 | array = page_address(page); | 771 | array = page_address(page); |
772 | 772 | ||
773 | /* Still possible to catch up to the tail */ | ||
774 | if (iter->next_idx[cpu] && array == data->trace_tail && | ||
775 | iter->next_page_idx[cpu] == data->trace_tail_idx) | ||
776 | return NULL; | ||
777 | |||
778 | WARN_ON(iter->next_page_idx[cpu] >= ENTRIES_PER_PAGE); | 773 | WARN_ON(iter->next_page_idx[cpu] >= ENTRIES_PER_PAGE); |
779 | return &array[iter->next_page_idx[cpu]]; | 774 | return &array[iter->next_page_idx[cpu]]; |
780 | } | 775 | } |
@@ -1921,7 +1916,6 @@ tracing_read_pipe(struct file *filp, char __user *ubuf, | |||
1921 | struct trace_iterator *iter = filp->private_data; | 1916 | struct trace_iterator *iter = filp->private_data; |
1922 | struct trace_array_cpu *data; | 1917 | struct trace_array_cpu *data; |
1923 | static cpumask_t mask; | 1918 | static cpumask_t mask; |
1924 | struct trace_entry *entry; | ||
1925 | static int start; | 1919 | static int start; |
1926 | unsigned long flags; | 1920 | unsigned long flags; |
1927 | int read = 0; | 1921 | int read = 0; |
@@ -2013,10 +2007,15 @@ tracing_read_pipe(struct file *filp, char __user *ubuf, | |||
2013 | cpu_set(cpu, mask); | 2007 | cpu_set(cpu, mask); |
2014 | } | 2008 | } |
2015 | 2009 | ||
2016 | while ((entry = find_next_entry_inc(iter)) != NULL) { | 2010 | while (find_next_entry_inc(iter) != NULL) { |
2011 | int len = iter->seq.len; | ||
2012 | |||
2017 | ret = print_trace_line(iter); | 2013 | ret = print_trace_line(iter); |
2018 | if (!ret) | 2014 | if (!ret) { |
2015 | /* don't print partial lines */ | ||
2016 | iter->seq.len = len; | ||
2019 | break; | 2017 | break; |
2018 | } | ||
2020 | 2019 | ||
2021 | trace_consume(iter); | 2020 | trace_consume(iter); |
2022 | 2021 | ||