2019-12-16 00:25:11

by Jules Irenge

[permalink] [raw]
Subject: [PATCH] kernel: events: add releases() notation

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

Signed-off-by: Jules Irenge <[email protected]>
---
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