selftests: xsk: add missing close() on netns fd
Subsystems (6)
Maciej Fijalkowski
maintainerPATCH 1/1 selftests: xsk: add missing close() on netns fd
Commit 1034b03e54ac ("selftests: xsk: Simplify cleanup of ifobjects") removed close on netns fd, which is not correct, so let us restore it.
Fixes 1034b03e54ac ("selftests: xsk: Simplify cleanup of ifobjects")
Acked-by Magnus Karlsson <[email protected]>
Signed-off-by Maciej Fijalkowski <[email protected]>
--- tools/testing/selftests/bpf/xskxceiver.c | 4 ++++ 1 file changed, 4 insertions(+)
tools/testing/selftests/bpf/xskxceiver.c +4 -0
@@ -1698,6 +1698,8 @@ static struct ifobject *ifobject_create(void)if (!ifobj->umem) goto out_umem; + ifobj->ns_fd =-1 ; +return ifobj; out_umem:
@@ -1709,6 +1711,8 @@ static struct ifobject *ifobject_create(void)static void ifobject_delete (struct ifobject *ifobj) { +if (ifobj->ns_fd !=-1 ) +close (ifobj->ns_fd);free (ifobj->umem);free (ifobj->xsk_arr);free (ifobj);
Signature · 1 line
2.34.1
This patch was applied to bpf/bpf.git (master) by Daniel Borkmann <[email protected]>:
Hello:
This patch was applied to bpf/bpf.git (master)
by Daniel Borkmann <[email protected]>:
Quoted 8 lines · On Tue, 30 Aug 2022 15:39:05 +0200 you wrote:
Commit
1034b03e54ac("selftests: xsk: Simplify cleanup of ifobjects") removed close on netns fd, which is not correct, so let us restore it.Fixes 1034b03e54ac ("selftests: xsk: Simplify cleanup of ifobjects")Acked-by Magnus Karlsson <[email protected]>Signed-off-by Maciej Fijalkowski <[email protected]>[...]
Here is the summary with links:
- [bpf] selftests: xsk: add missing close() on netns fd
https://git.kernel.org/bpf/bpf/c/8a7d61bdc2fa
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html