Skip to contentSkip to conversation

kernel: events: add releases() annotation

PATCH New Jules Irenge 1 participant 1 message Dec 16, 2019 perf events

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 kernel: events: add releases() annotation

Add releases() annotation to remove issue detected by sparse tool.
warning: context imbalance in perf_output_end() - unexpected unlock

---
Change
Added RCU as an argument in the releases() annotation

 kernel/events/ring_buffer.c | 1 +
 1 file changed, 1 insertion(+)
kernel/events/ring_buffer.c +1 -0
index 7ffd5c763f93..3381e70fb0f5 100644
@@ -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();
Signature · 1 line
2.23.0