bpf: Add missing annotations for __bpf_prog_enter() and __bpf_prog_exit()
authorJules Irenge <jbi.octave@gmail.com>
Wed, 11 Mar 2020 01:09:01 +0000 (01:09 +0000)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 13 Mar 2020 19:55:07 +0000 (20:55 +0100)
commitdcce11d545cc5d04c3fb529a8e2a0da987389139
treed235ecfa4fa2b74ecdb43d8371d8fac296ec804a
parent5996a587a466fa469531272139d23a3b56e07e5c
bpf: Add missing annotations for __bpf_prog_enter() and __bpf_prog_exit()

Sparse reports a warning at __bpf_prog_enter() and __bpf_prog_exit()

warning: context imbalance in __bpf_prog_enter() - wrong count at exit
warning: context imbalance in __bpf_prog_exit() - unexpected unlock

The root cause is the missing annotation at __bpf_prog_enter()
and __bpf_prog_exit()

Add the missing __acquires(RCU) annotation
Add the missing __releases(RCU) annotation

Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20200311010908.42366-2-jbi.octave@gmail.com
kernel/bpf/trampoline.c