* Forwarded: [syzbot] test patch for unregister_netdevice
2026-05-10 20:18 [syzbot] [net?] unregister_netdevice: waiting for DEV to become free (9) syzbot
@ 2026-05-14 1:51 ` syzbot
2026-05-14 2:08 ` Forwarded: [syzbot] test [PATCH net v2] ipv6: addrconf: skip autoconf on unregistering devices syzbot
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: syzbot @ 2026-05-14 1:51 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: [syzbot] test patch for unregister_netdevice
Author: raoxu@uniontech.com
#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;
^ permalink raw reply related [flat|nested] 9+ messages in thread* Forwarded: [syzbot] test [PATCH net v2] ipv6: addrconf: skip autoconf on unregistering devices
2026-05-10 20:18 [syzbot] [net?] unregister_netdevice: waiting for DEV to become free (9) syzbot
2026-05-14 1:51 ` Forwarded: [syzbot] test patch for unregister_netdevice syzbot
@ 2026-05-14 2:08 ` syzbot
2026-05-14 2:36 ` syzbot
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: syzbot @ 2026-05-14 2:08 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: [syzbot] test [PATCH net v2] ipv6: addrconf: skip autoconf on unregistering devices
Author: raoxu@uniontech.com
#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git main
From: Xu Rao <raoxu@uniontech.com>
Date: Tue, 12 May 2026 20:44:10 +0800
Subject: [PATCH net v2] ipv6: addrconf: skip autoconf on unregistering devices
syzbot reports that unregister_netdevice() can wait forever for a
netdevsim device whose reference count never drops to zero.
The leaked reference is held by an IPv6 local route created from
addrconf. A late NETDEV_CHANGE notification can still reach
addrconf_notify() after the device has entered NETREG_UNREGISTERING.
The handler can then run automatic address configuration, add a
link-local address and install its host route after unregister teardown
has already started. The route nexthop takes a netdev reference in
fib6_nh_init(), and there might not be a later ifdown pass to remove
the newly created address and route.
Do not run MTU, UP or CHANGE based IPv6 autoconfiguration once the
device is unregistering. Keep NETDEV_DOWN and NETDEV_UNREGISTER
handling unchanged so the teardown path can still remove existing IPv6
state.
Reported-by: syzbot+e2af46126e0644cbebdd@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=e2af46126e0644cbebdd
Signed-off-by: Xu Rao <raoxu@uniontech.com>
---
v2:
- Drop READ_ONCE() around dev->reg_state. addrconf_notify() is called
from the netdevice notifier path, so a plain load is sufficient.
- Do not add a Fixes tag. The issue does not appear to be caused by a
single commit, but by a long-standing unregister-time lifecycle gap.
net/ipv6/addrconf.c | 6 ++++++
1 file changed, 6 insertions(+)
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;
--
2.50.1
^ permalink raw reply related [flat|nested] 9+ messages in thread* Forwarded: [syzbot] test [PATCH net v2] ipv6: addrconf: skip autoconf on unregistering devices
2026-05-10 20:18 [syzbot] [net?] unregister_netdevice: waiting for DEV to become free (9) syzbot
2026-05-14 1:51 ` Forwarded: [syzbot] test patch for unregister_netdevice syzbot
2026-05-14 2:08 ` Forwarded: [syzbot] test [PATCH net v2] ipv6: addrconf: skip autoconf on unregistering devices syzbot
@ 2026-05-14 2:36 ` syzbot
2026-05-14 4:02 ` syzbot
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: syzbot @ 2026-05-14 2:36 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: [syzbot] test [PATCH net v2] ipv6: addrconf: skip autoconf on unregistering devices
Author: raoxu@uniontech.com
#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git main
^ permalink raw reply [flat|nested] 9+ messages in thread* Forwarded: [syzbot] test [PATCH net v2] ipv6: addrconf: skip autoconf on unregistering devices
2026-05-10 20:18 [syzbot] [net?] unregister_netdevice: waiting for DEV to become free (9) syzbot
` (2 preceding siblings ...)
2026-05-14 2:36 ` syzbot
@ 2026-05-14 4:02 ` syzbot
2026-05-14 6:48 ` Forwarded: [syzbot] test net main baseline syzbot
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: syzbot @ 2026-05-14 4:02 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: [syzbot] test [PATCH net v2] ipv6: addrconf: skip autoconf on unregistering devices
Author: raoxu@uniontech.com
#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git main
From: Xu Rao <raoxu@uniontech.com>
Subject: [PATCH net v2] ipv6: addrconf: skip autoconf on unregistering devices
syzbot reports that unregister_netdevice() can wait forever for a
netdevsim device whose reference count never drops to zero.
The leaked reference is held by an IPv6 local route created from
addrconf. A late NETDEV_CHANGE notification can still reach
addrconf_notify() after the device has entered NETREG_UNREGISTERING.
The handler can then run automatic address configuration, add a
link-local address and install its host route after unregister teardown
has already started. The route nexthop takes a netdev reference in
fib6_nh_init(), and there might not be a later ifdown pass to remove
the newly created address and route.
Do not run MTU, UP or CHANGE based IPv6 autoconfiguration once the
device is unregistering. Keep NETDEV_DOWN and NETDEV_UNREGISTER
handling unchanged so the teardown path can still remove existing IPv6
state.
Reported-by: syzbot+e2af46126e0644cbebdd@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=e2af46126e0644cbebdd
Signed-off-by: Xu Rao <raoxu@uniontech.com>
---
v2:
- Drop READ_ONCE() around dev->reg_state. addrconf_notify() is called
from the netdevice notifier path, so a plain load is sufficient.
- Do not add a Fixes tag. The issue does not appear to be caused by a
single commit, but by a long-standing unregister-time lifecycle gap.
net/ipv6/addrconf.c | 6 ++++++
1 file changed, 6 insertions(+)
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,12 +3694,15 @@ 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;
if (dev->priv_flags & IFF_NO_ADDRCONF) {
if (event == NETDEV_UP && !IS_ERR_OR_NULL(idev) &&
dev->flags & IFF_UP && dev->flags & IFF_MULTICAST)
ipv6_mc_up(idev);
break;
}
--
2.50.1
^ permalink raw reply related [flat|nested] 9+ messages in thread* Forwarded: [syzbot] test net main baseline
2026-05-10 20:18 [syzbot] [net?] unregister_netdevice: waiting for DEV to become free (9) syzbot
` (3 preceding siblings ...)
2026-05-14 4:02 ` syzbot
@ 2026-05-14 6:48 ` syzbot
2026-05-14 8:24 ` Forwarded: [syzbot] test [PATCH net v2] ipv6: addrconf: skip autoconf on unregistering devices syzbot
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: syzbot @ 2026-05-14 6:48 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: [syzbot] test net main baseline
Author: raoxu@uniontech.com
#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git main
^ permalink raw reply [flat|nested] 9+ messages in thread* Forwarded: [syzbot] test [PATCH net v2] ipv6: addrconf: skip autoconf on unregistering devices
2026-05-10 20:18 [syzbot] [net?] unregister_netdevice: waiting for DEV to become free (9) syzbot
` (4 preceding siblings ...)
2026-05-14 6:48 ` Forwarded: [syzbot] test net main baseline syzbot
@ 2026-05-14 8:24 ` syzbot
2026-05-14 11:12 ` Forwarded: [syzbot] test WARN_ON for addrconf " syzbot
2026-05-14 11:58 ` Forwarded: [syzbot] test baseline for unregister_netdevice ref leak syzbot
7 siblings, 0 replies; 9+ messages in thread
From: syzbot @ 2026-05-14 8: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: [syzbot] test [PATCH net v2] ipv6: addrconf: skip autoconf on unregistering devices
Author: raoxu@uniontech.com
#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci
From: Xu Rao <raoxu@uniontech.com>
Subject: [PATCH net v2] ipv6: addrconf: skip autoconf on unregistering devices
syzbot reports that unregister_netdevice() can wait forever for a
netdevsim device whose reference count never drops to zero.
The leaked reference is held by an IPv6 local route created from
addrconf. A late NETDEV_CHANGE notification can still reach
addrconf_notify() after the device has entered NETREG_UNREGISTERING.
The handler can then run automatic address configuration, add a
link-local address and install its host route after unregister teardown
has already started. The route nexthop takes a netdev reference in
fib6_nh_init(), and there might not be a later ifdown pass to remove
the newly created address and route.
Do not run MTU, UP or CHANGE based IPv6 autoconfiguration once the
device is unregistering. Keep NETDEV_DOWN and NETDEV_UNREGISTER
handling unchanged so the teardown path can still remove existing IPv6
state.
Reported-by: syzbot+e2af46126e0644cbebdd@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=e2af46126e0644cbebdd
Signed-off-by: Xu Rao <raoxu@uniontech.com>
---
v2:
- Drop READ_ONCE() around dev->reg_state. addrconf_notify() is called
from the netdevice notifier path, so a plain load is sufficient.
- Do not add a Fixes tag. The issue does not appear to be caused by a
single commit, but by a long-standing unregister-time lifecycle gap.
net/ipv6/addrconf.c | 6 ++++++
1 file changed, 6 insertions(+)
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,12 +3694,15 @@ 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;
if (dev->priv_flags & IFF_NO_ADDRCONF) {
if (event == NETDEV_UP && !IS_ERR_OR_NULL(idev) &&
dev->flags & IFF_UP && dev->flags & IFF_MULTICAST)
ipv6_mc_up(idev);
break;
}
--
2.50.1
^ permalink raw reply related [flat|nested] 9+ messages in thread* Forwarded: [syzbot] test WARN_ON for addrconf on unregistering devices
2026-05-10 20:18 [syzbot] [net?] unregister_netdevice: waiting for DEV to become free (9) syzbot
` (5 preceding siblings ...)
2026-05-14 8:24 ` Forwarded: [syzbot] test [PATCH net v2] ipv6: addrconf: skip autoconf on unregistering devices syzbot
@ 2026-05-14 11:12 ` syzbot
2026-05-14 11:58 ` Forwarded: [syzbot] test baseline for unregister_netdevice ref leak syzbot
7 siblings, 0 replies; 9+ messages in thread
From: syzbot @ 2026-05-14 11:12 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: [syzbot] test WARN_ON for addrconf on unregistering devices
Author: raoxu@uniontech.com
#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci
From: Xu Rao <raoxu@uniontech.com>
Subject: [PATCH debug] ipv6: addrconf: warn on autoconf for unregistering devices
Add WARN_ON() checks where the proposed fix skips IPv6 autoconf on
unregistering devices. This is a diagnostic patch to confirm whether
the syzbot reproducer reaches the MTU / UP / CHANGE paths after the
netdevice has entered NETREG_UNREGISTERING.
Signed-off-by: Xu Rao <raoxu@uniontech.com>
---
net/ipv6/addrconf.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 5476b6536eb7..72a3b17d30a1 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -3666,6 +3666,8 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event,
break;
case NETDEV_CHANGEMTU:
+ WARN_ON(dev->reg_state == NETREG_UNREGISTERING);
+
/* 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,12 +3693,14 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event,
fallthrough;
case NETDEV_UP:
case NETDEV_CHANGE:
+ WARN_ON(dev->reg_state == NETREG_UNREGISTERING);
+
if (idev && idev->cnf.disable_ipv6)
break;
if (dev->priv_flags & IFF_NO_ADDRCONF) {
if (event == NETDEV_UP && !IS_ERR_OR_NULL(idev) &&
dev->flags & IFF_UP && dev->flags & IFF_MULTICAST)
ipv6_mc_up(idev);
break;
}
--
2.50.1
^ permalink raw reply related [flat|nested] 9+ messages in thread* Forwarded: [syzbot] test baseline for unregister_netdevice ref leak
2026-05-10 20:18 [syzbot] [net?] unregister_netdevice: waiting for DEV to become free (9) syzbot
` (6 preceding siblings ...)
2026-05-14 11:12 ` Forwarded: [syzbot] test WARN_ON for addrconf " syzbot
@ 2026-05-14 11:58 ` syzbot
7 siblings, 0 replies; 9+ messages in thread
From: syzbot @ 2026-05-14 11:58 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: [syzbot] test baseline for unregister_netdevice ref leak
Author: raoxu@uniontech.com
#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci
^ permalink raw reply [flat|nested] 9+ messages in thread