[PATCH v2] kernel: events: add releases() annotation
From: Jules Irenge
Date: Mon Dec 16 2019 - 08:14:29 EST
Add releases() annotation to remove issue detected by sparse tool.
warning: context imbalance in perf_output_end() - unexpected unlock
Signed-off-by: Jules Irenge <jbi.octave@xxxxxxxxx>
---
Change
Added RCU as an argument in the releases() annotation
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..3381e70fb0f5 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(RCU)
{
perf_output_put_handle(handle);
rcu_read_unlock();
--
2.23.0