diff options
author | Jakub Kicinski <jakub.kicinski@netronome.com> | 2018-03-28 17:48:33 -0700 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2018-03-28 19:36:13 -0700 |
commit | e59ac634908f4ea90066e6db7dd7ae8ca02815ff (patch) | |
tree | a258186a27ba1cc4afa7823df80d828e79d74195 /include/linux/filter.h | |
parent | bfee64deaa766ba88ff42fcbced82ad4ef6cb315 (diff) | |
download | lwn-e59ac634908f4ea90066e6db7dd7ae8ca02815ff.tar.gz lwn-e59ac634908f4ea90066e6db7dd7ae8ca02815ff.zip |
bpf: add parenthesis around argument of BPF_LDST_BYTES()
BPF_LDST_BYTES() does not put it's argument in parenthesis
when referencing it. This makes it impossible to pass pointers
obtained by address-of operator (e.g. BPF_LDST_BYTES(&insn)).
Add the parenthesis.
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'include/linux/filter.h')
-rw-r--r-- | include/linux/filter.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/filter.h b/include/linux/filter.h index 109d05ccea9a..c2f167db8bd5 100644 --- a/include/linux/filter.h +++ b/include/linux/filter.h @@ -372,7 +372,7 @@ struct xdp_rxq_info; #define BPF_LDST_BYTES(insn) \ ({ \ - const int __size = bpf_size_to_bytes(BPF_SIZE(insn->code)); \ + const int __size = bpf_size_to_bytes(BPF_SIZE((insn)->code)); \ WARN_ON(__size < 0); \ __size; \ }) |