* [syzbot] [net?] WARNING in nsim_udp_tunnel_set_port
@ 2025-01-15 14:42 syzbot
2025-01-22 16:56 ` [syzbot] " syzbot
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: syzbot @ 2025-01-15 14:42 UTC (permalink / raw)
To: andrew+netdev, davem, edumazet, kuba, linux-kernel, netdev,
pabeni, syzkaller-bugs
Hello,
syzbot found the following issue on:
HEAD commit: 63676eefb7a0 Merge tag 'sched_ext-for-6.13-rc5-fixes' of g..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=1336e418580000
kernel config: https://syzkaller.appspot.com/x/.config?x=86dd15278dbfe19f
dashboard link: https://syzkaller.appspot.com/bug?extid=2e5de9e3ab986b71d2bf
compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=17cfb1c4580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13ac4edf980000
Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/ba5dd9f6cf65/disk-63676eef.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/290bc4e6d798/vmlinux-63676eef.xz
kernel image: https://storage.googleapis.com/syzbot-assets/561f22e07925/bzImage-63676eef.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+2e5de9e3ab986b71d2bf@syzkaller.appspotmail.com
------------[ cut here ]------------
entry already in use
WARNING: CPU: 1 PID: 5869 at drivers/net/netdevsim/udp_tunnels.c:26 nsim_udp_tunnel_set_port+0x2d3/0x390 drivers/net/netdevsim/udp_tunnels.c:26
Modules linked in:
CPU: 1 UID: 0 PID: 5869 Comm: syz-executor227 Not tainted 6.13.0-rc5-syzkaller-00161-g63676eefb7a0 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
RIP: 0010:nsim_udp_tunnel_set_port+0x2d3/0x390 drivers/net/netdevsim/udp_tunnels.c:26
Code: c3 cc cc cc cc e8 dd a0 ca fa 44 89 f7 e8 85 38 b8 fa e9 ee fd ff ff e8 cb a0 ca fa 90 48 c7 c7 e0 7f 0a 8c e8 fe 66 8b fa 90 <0f> 0b 90 90 4c 8d 73 04 41 bf f0 ff ff ff e9 fa fe ff ff e8 c5 10
RSP: 0018:ffffc90003fffab8 EFLAGS: 00010282
RAX: 0000000000000000 RBX: ffffc90003fffbb0 RCX: ffffffff815a1789
RDX: ffff8880301d5a00 RSI: ffffffff815a1796 RDI: 0000000000000001
RBP: ffff8880744cc000 R08: 0000000000000001 R09: 0000000000000000
R10: 0000000000000001 R11: 0000000000000001 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000017c10002 R15: 0000000000000000
FS: 0000555579af3380(0000) GS:ffff8880b8700000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f5ac84532b0 CR3: 000000001decc000 CR4: 00000000003526f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
udp_tunnel_nic_device_sync_one net/ipv4/udp_tunnel_nic.c:225 [inline]
udp_tunnel_nic_device_sync_by_port net/ipv4/udp_tunnel_nic.c:246 [inline]
__udp_tunnel_nic_device_sync.part.0+0x935/0xed0 net/ipv4/udp_tunnel_nic.c:289
__udp_tunnel_nic_device_sync net/ipv4/udp_tunnel_nic.c:283 [inline]
__udp_tunnel_nic_reset_ntf+0x3c1/0x520 net/ipv4/udp_tunnel_nic.c:581
udp_tunnel_nic_reset_ntf include/net/udp_tunnel.h:377 [inline]
nsim_udp_tunnels_info_reset_write+0xc2/0x110 drivers/net/netdevsim/udp_tunnels.c:117
full_proxy_write+0xfb/0x1b0 fs/debugfs/file.c:356
vfs_write+0x24c/0x1150 fs/read_write.c:677
ksys_write+0x12b/0x250 fs/read_write.c:731
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f5ac83d0df9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 01 1a 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffc834f88c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007f5ac83d0df9
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000003
RBP: 0000000000000000 R08: 00007f5ac841e1fa R09: 00007f5ac841e1fa
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f5ac841e453
R13: 0000000000000001 R14: 00007ffc834f8900 R15: 0000000000000000
</TASK>
---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@googlegroups.com.
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title
If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.
If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)
If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report
If you want to undo deduplication, reply with:
#syz undup
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [syzbot] Re: [syzbot] [net?] WARNING in nsim_udp_tunnel_set_port
2025-01-15 14:42 [syzbot] [net?] WARNING in nsim_udp_tunnel_set_port syzbot
@ 2025-01-22 16:56 ` syzbot
2025-01-22 17:17 ` syzbot
2025-01-22 21:24 ` syzbot
2 siblings, 0 replies; 4+ messages in thread
From: syzbot @ 2025-01-22 16:56 UTC (permalink / raw)
To: linux-kernel, syzkaller-bugs
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com.
***
Subject: Re: [syzbot] [net?] WARNING in nsim_udp_tunnel_set_port
Author: kuba@kernel.org
On Wed, 15 Jan 2025 06:42:22 -0800 syzbot wrote:
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit: 63676eefb7a0 Merge tag 'sched_ext-for-6.13-rc5-fixes' of g..
> git tree: upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=1336e418580000
> kernel config: https://syzkaller.appspot.com/x/.config?x=86dd15278dbfe19f
> dashboard link: https://syzkaller.appspot.com/bug?extid=2e5de9e3ab986b71d2bf
> compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=17cfb1c4580000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13ac4edf980000
>
> Downloadable assets:
> disk image: https://storage.googleapis.com/syzbot-assets/ba5dd9f6cf65/disk-63676eef.raw.xz
> vmlinux: https://storage.googleapis.com/syzbot-assets/290bc4e6d798/vmlinux-63676eef.xz
> kernel image: https://storage.googleapis.com/syzbot-assets/561f22e07925/bzImage-63676eef.xz
>
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+2e5de9e3ab986b71d2bf@syzkaller.appspotmail.com
#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git main
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [syzbot] Re: [syzbot] [net?] WARNING in nsim_udp_tunnel_set_port
2025-01-15 14:42 [syzbot] [net?] WARNING in nsim_udp_tunnel_set_port syzbot
2025-01-22 16:56 ` [syzbot] " syzbot
@ 2025-01-22 17:17 ` syzbot
2025-01-22 21:24 ` syzbot
2 siblings, 0 replies; 4+ messages in thread
From: syzbot @ 2025-01-22 17:17 UTC (permalink / raw)
To: linux-kernel, syzkaller-bugs
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com.
***
Subject: Re: [syzbot] [net?] WARNING in nsim_udp_tunnel_set_port
Author: kuba@kernel.org
On Wed, 15 Jan 2025 06:42:22 -0800 syzbot wrote:
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit: 63676eefb7a0 Merge tag 'sched_ext-for-6.13-rc5-fixes' of g..
> git tree: upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=1336e418580000
> kernel config: https://syzkaller.appspot.com/x/.config?x=86dd15278dbfe19f
> dashboard link: https://syzkaller.appspot.com/bug?extid=2e5de9e3ab986b71d2bf
> compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=17cfb1c4580000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13ac4edf980000
>
> Downloadable assets:
> disk image: https://storage.googleapis.com/syzbot-assets/ba5dd9f6cf65/disk-63676eef.raw.xz
> vmlinux: https://storage.googleapis.com/syzbot-assets/290bc4e6d798/vmlinux-63676eef.xz
> kernel image: https://storage.googleapis.com/syzbot-assets/561f22e07925/bzImage-63676eef.xz
>
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+2e5de9e3ab986b71d2bf@syzkaller.appspotmail.com
#syz test
diff --git a/drivers/net/netdevsim/udp_tunnels.c b/drivers/net/netdevsim/udp_tunnels.c
index 02dc3123eb6c..9c627433c34a 100644
--- a/drivers/net/netdevsim/udp_tunnels.c
+++ b/drivers/net/netdevsim/udp_tunnels.c
@@ -112,8 +112,8 @@ nsim_udp_tunnels_info_reset_write(struct file *file, const char __user *data,
struct net_device *dev = file->private_data;
struct netdevsim *ns = netdev_priv(dev);
- memset(ns->udp_ports.ports, 0, sizeof(ns->udp_ports.__ports));
rtnl_lock();
+ memset(ns->udp_ports.ports, 0, sizeof(ns->udp_ports.__ports));
udp_tunnel_nic_reset_ntf(dev);
rtnl_unlock();
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [syzbot] Re: [syzbot] [net?] WARNING in nsim_udp_tunnel_set_port
2025-01-15 14:42 [syzbot] [net?] WARNING in nsim_udp_tunnel_set_port syzbot
2025-01-22 16:56 ` [syzbot] " syzbot
2025-01-22 17:17 ` syzbot
@ 2025-01-22 21:24 ` syzbot
2 siblings, 0 replies; 4+ messages in thread
From: syzbot @ 2025-01-22 21:24 UTC (permalink / raw)
To: linux-kernel, syzkaller-bugs
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com.
***
Subject: Re: [syzbot] [net?] WARNING in nsim_udp_tunnel_set_port
Author: kuba@kernel.org
On Wed, 15 Jan 2025 06:42:22 -0800 syzbot wrote:
> HEAD commit: 63676eefb7a0 Merge tag 'sched_ext-for-6.13-rc5-fixes' of g..
> git tree: upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=1336e418580000
> kernel config: https://syzkaller.appspot.com/x/.config?x=86dd15278dbfe19f
> dashboard link: https://syzkaller.appspot.com/bug?extid=2e5de9e3ab986b71d2bf
> compiler: gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=17cfb1c4580000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13ac4edf980000
>
> Downloadable assets:
> disk image: https://storage.googleapis.com/syzbot-assets/ba5dd9f6cf65/disk-63676eef.raw.xz
> vmlinux: https://storage.googleapis.com/syzbot-assets/290bc4e6d798/vmlinux-63676eef.xz
> kernel image: https://storage.googleapis.com/syzbot-assets/561f22e07925/bzImage-63676eef.xz
>
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+2e5de9e3ab986b71d2bf@syzkaller.appspotmail.com
#syz test
diff --git a/drivers/net/netdevsim/netdevsim.h b/drivers/net/netdevsim/netdevsim.h
index dcf073bc4802..96d54c08043d 100644
--- a/drivers/net/netdevsim/netdevsim.h
+++ b/drivers/net/netdevsim/netdevsim.h
@@ -134,6 +134,7 @@ struct netdevsim {
u32 sleep;
u32 __ports[2][NSIM_UDP_TUNNEL_N_PORTS];
u32 (*ports)[NSIM_UDP_TUNNEL_N_PORTS];
+ struct dentry *ddir;
struct debugfs_u32_array dfs_ports[2];
} udp_ports;
diff --git a/drivers/net/netdevsim/udp_tunnels.c b/drivers/net/netdevsim/udp_tunnels.c
index 02dc3123eb6c..cc8cec23ca7e 100644
--- a/drivers/net/netdevsim/udp_tunnels.c
+++ b/drivers/net/netdevsim/udp_tunnels.c
@@ -112,9 +112,11 @@ nsim_udp_tunnels_info_reset_write(struct file *file, const char __user *data,
struct net_device *dev = file->private_data;
struct netdevsim *ns = netdev_priv(dev);
- memset(ns->udp_ports.ports, 0, sizeof(ns->udp_ports.__ports));
rtnl_lock();
- udp_tunnel_nic_reset_ntf(dev);
+ if (dev->reg_state == NETREG_REGISTERED) {
+ memset(ns->udp_ports.ports, 0, sizeof(ns->udp_ports.__ports));
+ udp_tunnel_nic_reset_ntf(dev);
+ }
rtnl_unlock();
return count;
@@ -160,7 +162,8 @@ int nsim_udp_tunnels_info_create(struct nsim_dev *nsim_dev,
ns->nsim_dev_port->ddir,
&ns->udp_ports.dfs_ports[1]);
- debugfs_create_file("udp_ports_reset", 0200, ns->nsim_dev_port->ddir,
+ ns->udp_ports.ddir =
+ debugfs_create_file("udp_ports_reset", 0200, ns->nsim_dev_port->ddir,
dev, &nsim_udp_tunnels_info_reset_fops);
/* Note: it's not normal to allocate the info struct like this!
@@ -196,6 +199,9 @@ int nsim_udp_tunnels_info_create(struct nsim_dev *nsim_dev,
void nsim_udp_tunnels_info_destroy(struct net_device *dev)
{
+ struct netdevsim *ns = netdev_priv(dev);
+
+ debugfs_remove(ns->udp_ports.ddir);
kfree(dev->udp_tunnel_nic_info);
dev->udp_tunnel_nic_info = NULL;
}
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-01-22 21:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-15 14:42 [syzbot] [net?] WARNING in nsim_udp_tunnel_set_port syzbot
2025-01-22 16:56 ` [syzbot] " syzbot
2025-01-22 17:17 ` syzbot
2025-01-22 21:24 ` syzbot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox