diff options
author | David Ahern <dsahern@gmail.com> | 2020-04-12 15:32:04 +0200 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2020-04-14 21:38:02 +0200 |
commit | dfa74909cb6b846cbdabfc2c3c7de1d507fca075 (patch) | |
tree | abcec0eda77f457704330ae51338d22e98d656c9 /fs/d_path.c | |
parent | tools, bpftool: Fix struct_ops command invalid pointer free (diff) | |
download | linux-dfa74909cb6b846cbdabfc2c3c7de1d507fca075.tar.xz linux-dfa74909cb6b846cbdabfc2c3c7de1d507fca075.zip |
xdp: Reset prog in dev_change_xdp_fd when fd is negative
The commit mentioned in the Fixes tag reuses the local prog variable
when looking up an expected_fd. The variable is not reset when fd < 0
causing a detach with the expected_fd set to actually call
dev_xdp_install for the existing program. The end result is that the
detach does not happen.
Fixes: 92234c8f15c8 ("xdp: Support specifying expected existing program when attaching XDP")
Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Toke Høiland-Jørgensen <toke@redhat.com>
Link: https://lore.kernel.org/bpf/20200412133204.43847-1-dsahern@kernel.org
Diffstat (limited to 'fs/d_path.c')
0 files changed, 0 insertions, 0 deletions