Subject: Re: [PATCH bpf] xdp: Reset prog in dev_change_xdp_fd when fd is negative

From: Toke Høiland-Jørgensen <[email-masked]>
Date: Tue, 14 Apr 2020 09:17:32 +0200

David Ahern <[email-masked]> writes:

> From: David Ahern <[email-masked]>
>
> 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 <[email-masked]>
> Cc: Toke Høiland-Jørgensen <[email-masked]>

Ugh, my bad (obviously!). Thanks for the fix! I'll send an update to the
selftest to catch errors like this...

Reviewed-by: Toke Høiland-Jørgensen <[email-masked]>