Forwarded: [syzbot] test patch for unregister_netdevice

From: syzbot

Date: Wed May 13 2026 - 21:51:12 EST


For archival purposes, forwarding an incoming command email to
linux-kernel@xxxxxxxxxxxxxxx, syzkaller-bugs@xxxxxxxxxxxxxxxx.

***

Subject: [syzbot] test patch for unregister_netdevice
Author: raoxu@xxxxxxxxxxxxx

#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git main

diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 5476b6536eb7..a517e57cf86a 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -3666,6 +3666,9 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event,
break;

case NETDEV_CHANGEMTU:
+ if (dev->reg_state == NETREG_UNREGISTERING)
+ break;
+
/* if MTU under IPV6_MIN_MTU stop IPv6 on this interface. */
if (dev->mtu < IPV6_MIN_MTU) {
addrconf_ifdown(dev, dev != net->loopback_dev);
@@ -3691,6 +3694,9 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event,
fallthrough;
case NETDEV_UP:
case NETDEV_CHANGE:
+ if (dev->reg_state == NETREG_UNREGISTERING)
+ break;
+
if (idev && idev->cnf.disable_ipv6)
break;