* [PATCH] kernel: events: add releases() notation
@ 2019-12-16 0:24 Jules Irenge
2019-12-16 8:31 ` Peter Zijlstra
0 siblings, 1 reply; 3+ messages in thread
From: Jules Irenge @ 2019-12-16 0:24 UTC (permalink / raw)
To: bokun.feng
Cc: peterz, mingo, acme, mark.rutland, alexander.shishkin, jolsa,
namhyung, linux-kernel, Jules Irenge
Add releases() notation to remove issue detected by sparse
context imbalance in perf_output_end() - unexpected unlock
Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] kernel: events: add releases() notation
2019-12-16 0:24 [PATCH] kernel: events: add releases() notation Jules Irenge
@ 2019-12-16 8:31 ` Peter Zijlstra
2019-12-16 13:37 ` Jules Irenge
0 siblings, 1 reply; 3+ messages in thread
From: Peter Zijlstra @ 2019-12-16 8:31 UTC (permalink / raw)
To: Jules Irenge
Cc: bokun.feng, mingo, acme, mark.rutland, alexander.shishkin, jolsa,
namhyung, linux-kernel
On Mon, Dec 16, 2019 at 12:24:00AM +0000, Jules Irenge wrote:
> Add releases() notation to remove issue detected by sparse
> context imbalance in perf_output_end() - unexpected unlock
None of the perf code uses the __acquire / __release annotations crud.
Also, your annotation is broken, I think it should be __releases(RCU) or
something like that.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] kernel: events: add releases() notation
2019-12-16 8:31 ` Peter Zijlstra
@ 2019-12-16 13:37 ` Jules Irenge
0 siblings, 0 replies; 3+ messages in thread
From: Jules Irenge @ 2019-12-16 13:37 UTC (permalink / raw)
To: Peter Zijlstra
Cc: Jules Irenge, bokun.feng, mingo, acme, mark.rutland,
alexander.shishkin, jolsa, namhyung, linux-kernel
On Mon, 16 Dec 2019, Peter Zijlstra wrote:
> On Mon, Dec 16, 2019 at 12:24:00AM +0000, Jules Irenge wrote:
> > Add releases() notation to remove issue detected by sparse
> > context imbalance in perf_output_end() - unexpected unlock
>
> None of the perf code uses the __acquire / __release annotations crud.
> Also, your annotation is broken, I think it should be __releases(RCU) or
> something like that.
>
>
Thanks for the response. I already updated.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-12-16 13:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-16 0:24 [PATCH] kernel: events: add releases() notation Jules Irenge
2019-12-16 8:31 ` Peter Zijlstra
2019-12-16 13:37 ` Jules Irenge
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).