diff options
-rw-r--r-- | kernel/trace/ring_buffer.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index dc18b5b9ccb4..f39d7e9a4305 100644 --- a/kernel/trace/ring_buffer.c +++ b/kernel/trace/ring_buffer.c | |||
@@ -1017,7 +1017,7 @@ __rb_reserve_next(struct ring_buffer_per_cpu *cpu_buffer, | |||
1017 | */ | 1017 | */ |
1018 | if (unlikely(in_nmi())) { | 1018 | if (unlikely(in_nmi())) { |
1019 | if (!__raw_spin_trylock(&cpu_buffer->lock)) | 1019 | if (!__raw_spin_trylock(&cpu_buffer->lock)) |
1020 | goto out_unlock; | 1020 | goto out_reset; |
1021 | } else | 1021 | } else |
1022 | __raw_spin_lock(&cpu_buffer->lock); | 1022 | __raw_spin_lock(&cpu_buffer->lock); |
1023 | 1023 | ||
@@ -1030,7 +1030,7 @@ __rb_reserve_next(struct ring_buffer_per_cpu *cpu_buffer, | |||
1030 | 1030 | ||
1031 | /* we grabbed the lock before incrementing */ | 1031 | /* we grabbed the lock before incrementing */ |
1032 | if (RB_WARN_ON(cpu_buffer, next_page == reader_page)) | 1032 | if (RB_WARN_ON(cpu_buffer, next_page == reader_page)) |
1033 | goto out_unlock; | 1033 | goto out_reset; |
1034 | 1034 | ||
1035 | /* | 1035 | /* |
1036 | * If for some reason, we had an interrupt storm that made | 1036 | * If for some reason, we had an interrupt storm that made |
@@ -1039,12 +1039,12 @@ __rb_reserve_next(struct ring_buffer_per_cpu *cpu_buffer, | |||
1039 | */ | 1039 | */ |
1040 | if (unlikely(next_page == commit_page)) { | 1040 | if (unlikely(next_page == commit_page)) { |
1041 | WARN_ON_ONCE(1); | 1041 | WARN_ON_ONCE(1); |
1042 | goto out_unlock; | 1042 | goto out_reset; |
1043 | } | 1043 | } |
1044 | 1044 | ||
1045 | if (next_page == head_page) { | 1045 | if (next_page == head_page) { |
1046 | if (!(buffer->flags & RB_FL_OVERWRITE)) | 1046 | if (!(buffer->flags & RB_FL_OVERWRITE)) |
1047 | goto out_unlock; | 1047 | goto out_reset; |
1048 | 1048 | ||
1049 | /* tail_page has not moved yet? */ | 1049 | /* tail_page has not moved yet? */ |
1050 | if (tail_page == cpu_buffer->tail_page) { | 1050 | if (tail_page == cpu_buffer->tail_page) { |
@@ -1118,7 +1118,7 @@ __rb_reserve_next(struct ring_buffer_per_cpu *cpu_buffer, | |||
1118 | 1118 | ||
1119 | return event; | 1119 | return event; |
1120 | 1120 | ||
1121 | out_unlock: | 1121 | out_reset: |
1122 | /* reset write */ | 1122 | /* reset write */ |
1123 | if (tail <= BUF_PAGE_SIZE) | 1123 | if (tail <= BUF_PAGE_SIZE) |
1124 | local_set(&tail_page->write, tail); | 1124 | local_set(&tail_page->write, tail); |