]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit33c78140a3d64cc1d19495974ae07c0e99c9208e
treed235ecfa4fa2b74ecdb43d8371d8fac296ec804a
parentbeb49e053e78e63b8846a7280d44dd0fedfdcf75
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