bpf: cleanup bpf_prog_run_{save,clear}_cb helpers
authorDaniel Borkmann <daniel@iogearbox.net>
Wed, 6 Jan 2016 21:32:16 +0000 (22:32 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 9 Jan 2016 02:40:34 +0000 (21:40 -0500)
commit01dd194c387af5b3c4c1f6459d30f596565e466c
treec440172d23a281207f7307c1099165b592953efb
parentb351a0633e771676f94262a209ae28699eb26038
bpf: cleanup bpf_prog_run_{save,clear}_cb helpers

Move the details behind the cb[] access into a small helper to decouple
and make them generic for bpf_prog_run_save_cb()/bpf_prog_run_clear_cb()
that was introduced via commit ff936a04e5f2 ("bpf: fix cb access in socket
filter programs"). Also add a comment to better clarify what is done in
bpf_skb_cb().

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/filter.h