[PATCH 04/11] perf/ring_buffer: Add missing annotation to perf_output_end()

From: Jules Irenge
Date: Sun Feb 09 2020 - 17:33:37 EST


Sparse reports a warning at perf_output_end()

warning: context imbalance in perf_output_end() - unexpected unlock

The root cause is a missing annotation for perf_output_end()

Add the missing __releases(RCU) annotation

Signed-off-by: Jules Irenge <jbi.octave@xxxxxxxxx>
---
kernel/events/ring_buffer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/events/ring_buffer.c b/kernel/events/ring_buffer.c
index 7ffd5c763f93..c09edc49a4fc 100644
--- a/kernel/events/ring_buffer.c
+++ b/kernel/events/ring_buffer.c
@@ -294,7 +294,7 @@ unsigned int perf_output_skip(struct perf_output_handle *handle,
return __output_skip(handle, NULL, len);
}

-void perf_output_end(struct perf_output_handle *handle)
+void perf_output_end(struct perf_output_handle *handle) __releases(RCU)
{
perf_output_put_handle(handle);
rcu_read_unlock();
--
2.24.1