In the Linux kernel, the following vulnerability has been resolved:
driver core: Fix waitfordeviceprobe() & deferredprobe_timeout interaction
Mounting NFS rootfs was timing out when deferredprobetimeout was non-zero [1]. This was because ipautoconfig() initcall times out waiting for the network interfaces to show up when deferredprobetimeout was non-zero. While ipautoconfig() calls waitfordeviceprobe() to make sure any currently running deferred probe work or asynchronous probe finishes, that wasn't sufficient to account for devices being deferred until deferredprobe_timeout.
Commit 35a672363ab3 ("driver core: Ensure waitfordeviceprobe() waits until the deferredprobetimeout fires") tried to fix that by making sure waitfordeviceprobe() waits for deferredprobetimeout to expire before returning.
However, if waitfordeviceprobe() is called from the kernelinit() context:
Before deferredprobeinitcall() [2], it causes the boot process to hang due to a deadlock.
After deferredprobeinitcall() [3], it blocks kernelinit() from continuing till deferredprobetimeout expires and beats the point of deferredprobe_timeout that's trying to wait for userspace to load modules.
Neither of this is good. So revert the changes to waitfordevice_probe().
[1] - https://lore.kernel.org/lkml/TYAPR01MB45443DF63B9EF29054F7C41FD8C60@TYAPR01MB4544.jpnprd01.prod.outlook.com/ [2] - https://lore.kernel.org/lkml/YowHNo4sBjr9ijZr@dev-arch.thelio-3990X/ [3] - https://lore.kernel.org/lkml/Yo3WvGnNk3LvLb7R@linutronix.de/