]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: netdevsim: try to close UDP port harness races
authorJakub Kicinski <kuba@kernel.org>
Wed, 22 Jan 2025 22:45:03 +0000 (14:45 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 8 Feb 2025 09:02:12 +0000 (10:02 +0100)
commit63a89ac4b9da8285be784b81e2e20a1a548f07b1
treea25868d7e55ab5d103935bf16ed9f71cfaff849b
parent58051a284ac18a3bb815aac6289a679903ddcc3f
net: netdevsim: try to close UDP port harness races

[ Upstream commit 50bf398e1ceacb9a7f85bd3bdca065ebe5cb6159 ]

syzbot discovered that we remove the debugfs files after we free
the netdev. Try to clean up the relevant dir while the device
is still around.

Reported-by: syzbot+2e5de9e3ab986b71d2bf@syzkaller.appspotmail.com
Fixes: 424be63ad831 ("netdevsim: add UDP tunnel port offload support")
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Link: https://patch.msgid.link/20250122224503.762705-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/netdevsim/netdevsim.h
drivers/net/netdevsim/udp_tunnels.c
tools/testing/selftests/drivers/net/netdevsim/udp_tunnel_nic.sh