Re: [PATCH net v2] ipv6: addrconf: skip autoconf on unregistering devices

From: Xu Rao

Date: Thu May 14 2026 - 09:24:16 EST


Hi Tetsuo,

> Will you test your patch with
>
> - if (dev->reg_state == NETREG_UNREGISTERING)
> - break;
> -
> + WARN_ON(dev->reg_state == NETREG_UNREGISTERING);
>
> and confirm that WARN_ON() fires, for nobody knows whether this refcount
> was obtained after dev->reg_state became NETREG_UNREGISTERING ?

> Please be aware that the stack traces that follow

I ran the additional syzbot tests on the same tree.

First, the proposed v2 patch did not reproduce the issue:

commit: 5cbb61bf4168
git tree: git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci
result: OK
console: https://syzkaller.appspot.com/x/log.txt?x=147a20ec580000
patch: https://syzkaller.appspot.com/x/patch.diff?x=12255636580000

Second, I tested the diagnostic WARN_ON() patch suggested in this
thread. That patch adds WARN_ON(dev->reg_state == NETREG_UNREGISTERING)
at the NETDEV_CHANGEMTU and NETDEV_UP/NETDEV_CHANGE paths. syzbot also
reported OK for that diagnostic patch:

commit: 5cbb61bf4168
git tree: git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci
result: OK
console: https://syzkaller.appspot.com/x/log.txt?x=10eae996580000
patch: https://syzkaller.appspot.com/x/patch.diff?x=1182da73980000

I checked the console log and did not find a WARN_ON() splat.

Finally, I ran the same tree without any patch, as a baseline. That run
did reproduce the problem:

commit: 5cbb61bf4168
git tree: git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci
result: report
report: https://syzkaller.appspot.com/x/report.txt?x=13f620ec580000
console: https://syzkaller.appspot.com/x/log.txt?x=15f620ec580000

So the no-patch baseline still triggers the leak in the same environment
where both the proposed patch and the WARN_ON() diagnostic patch returned
OK.

I agree that the WARN_ON() result does not prove the exact
NETREG_UNREGISTERING hypothesis, because it did not trigger. I also do
not think this negative result is strong enough to disprove the race:
this bug is timing-sensitive, and even adding the reg_state load, branch
and WARN_ON() site can perturb the execution enough for a best-effort
syzbot run not to hit the same interleaving.

Thanks,
Xu Rao