]> git.baikalelectronics.ru Git - kernel.git/commit
bpf, cls: consolidate prog deletion path
authorDaniel Borkmann <daniel@iogearbox.net>
Sun, 4 Dec 2016 22:19:40 +0000 (23:19 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 5 Dec 2016 20:33:10 +0000 (15:33 -0500)
commitad39c0b0f97c229ddbc093f53ef90e7c8ed53844
tree4deaf4dfba72008674fb3718e01699c89b8f8ad8
parent08e137c89346659fd8b7d5768524cc4803798ae3
bpf, cls: consolidate prog deletion path

Commit defddc55793e ("net: sched: do not use tcf_proto 'tp' argument from
call_rcu") removed the last usage of tp from cls_bpf_delete_prog(), so also
remove it from the function as argument to not give a wrong impression. tp
is illegal to access from this callback, since it could already have been
freed.

Refactor the deletion code a bit, so that cls_bpf_destroy() can call into
the same code for prog deletion as cls_bpf_delete() op, instead of having
it unnecessarily duplicated.

Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/cls_bpf.c