lkml.org 
[lkml]   [2019]   [Dec]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [RESEND PATCH] kernel: bpf: add releases() annotation
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
>

\
 
 \ /
  Last update: 2019-12-16 16:05    [W:0.032 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site