[PATCH] kernel: events: add releases() notation

From: Jules Irenge
Date: Sun Dec 15 2019 - 19:24:18 EST


Add releases() notation to remove issue detected by sparse
context imbalance in perf_output_end() - unexpected unlock

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

diff --git a/kernel/events/ring_buffer.c b/kernel/events/ring_buffer.c
index 7ffd5c763f93..c8ad63f9faa5 100644
--- a/kernel/events/ring_buffer.c
+++ b/kernel/events/ring_buffer.c
@@ -295,6 +295,7 @@ unsigned int perf_output_skip(struct perf_output_handle *handle,
}

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