linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RESEND PATCH] kernel: bpf: add releases() annotation
@ 2019-12-16 12:42 Jules Irenge
  2019-12-16 15:04 ` Daniel Borkmann
  0 siblings, 1 reply; 2+ messages in thread
From: Jules Irenge @ 2019-12-16 12:42 UTC (permalink / raw)
  To: bokun.feng
  Cc: ast, daniel, kafai, songliubraving, yhs, andriin, netdev, bpf,
	linux-kernel, Jules Irenge

Add sparse annotation to remove issue detected by sparse tool.
warning: context imbalance in __bpf_prog_exit - unexpected unlock

Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
 kernel/bpf/trampoline.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel/bpf/trampoline.c b/kernel/bpf/trampoline.c
index 7e89f1f49d77..fb43b7a57e38 100644
--- a/kernel/bpf/trampoline.c
+++ b/kernel/bpf/trampoline.c
@@ -213,6 +213,7 @@ u64 notrace __bpf_prog_enter(void)
 }
 
 void notrace __bpf_prog_exit(struct bpf_prog *prog, u64 start)
+	__releases(RCU)
 {
 	struct bpf_prog_stats *stats;
 
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [RESEND PATCH] kernel: bpf: add releases() annotation
  2019-12-16 12:42 [RESEND PATCH] kernel: bpf: add releases() annotation Jules Irenge
@ 2019-12-16 15:04 ` Daniel Borkmann
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Borkmann @ 2019-12-16 15:04 UTC (permalink / raw)
  To: Jules Irenge
  Cc: bokun.feng, ast, kafai, songliubraving, yhs, andriin, netdev,
	bpf, linux-kernel

On Mon, Dec 16, 2019 at 12:42:39PM +0000, Jules Irenge wrote:
> Add sparse annotation to remove issue detected by sparse tool.
> warning: context imbalance in __bpf_prog_exit - unexpected unlock
> 
> Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
> ---
>  kernel/bpf/trampoline.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/kernel/bpf/trampoline.c b/kernel/bpf/trampoline.c
> index 7e89f1f49d77..fb43b7a57e38 100644
> --- a/kernel/bpf/trampoline.c
> +++ b/kernel/bpf/trampoline.c
> @@ -213,6 +213,7 @@ u64 notrace __bpf_prog_enter(void)
>  }
>  
>  void notrace __bpf_prog_exit(struct bpf_prog *prog, u64 start)
> +	__releases(RCU)

Hmm, why are you not adding an annotation to __bpf_prog_enter() as well ?

>  {
>  	struct bpf_prog_stats *stats;
>  
> -- 
> 2.23.0
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-12-16 15:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-16 12:42 [RESEND PATCH] kernel: bpf: add releases() annotation Jules Irenge
2019-12-16 15:04 ` Daniel Borkmann

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).