bpf: reset id on CONST_IMM transition
authorDaniel Borkmann <daniel@iogearbox.net>
Sat, 10 Jun 2017 22:50:42 +0000 (00:50 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 10 Jun 2017 23:05:45 +0000 (19:05 -0400)
commit4a2ff55aa4946b036b87572976cbfc6ab244c497
tree85f6b87a60dcb4a9a6460e5dd5ee06a0704af187
parentd25da6caa2a1d6644360c40d7c5fd7c057551360
bpf: reset id on CONST_IMM transition

Whenever we set the register to the type CONST_IMM, we currently don't
reset the id to 0. id member is not used in CONST_IMM case, so don't
let it become stale, where pruning won't be able to match later on.

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