bonding: fix the program leak when XDP is replaced

We need to release the reference on the old BPF prog, whether
we are going to no-prog, or replacing the prog with another.

Spotted by AI while running tests for the propagation series
(leaked programs were accumulating). Selftest will come in
the net-next series to avoid conflicts.

Fixes: 9e2ee5c7e7 ("net, bonding: Add XDP support to the bonding driver")
Fixes: 6d5f1ef838 ("bonding: Fix negative jump label count on nested bonding")
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: Jiayuan Chen <jiayuan.chen@linux.dev>
Link: https://patch.msgid.link/20261001012639.298690-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Jakub Kicinski 2026-09-30 18:26:39 -07:00
commit 184b5ddf82