• Rasmus Villemoes's avatar
    init: move usermodehelper_enable() to populate_rootfs() · b234ed6d
    Rasmus Villemoes authored
    Currently, usermodehelper is enabled right before PID1 starts going
    through the initcalls. However, any call of a usermodehelper from a
    pure_, core_, postcore_, arch_, subsys_ or fs_ initcall is futile, as
    there is no filesystem contents yet.
    
    Up until commit e7cb072e ("init/initramfs.c: do unpacking
    asynchronously"), such calls, whether via some request_module(), a
    legacy uevent "/sbin/hotplug" notification or something else, would
    just fail silently with (presumably) -ENOENT from
    kernel_execve(). However, that commit introduced the
    wait_for_initramfs() synchronization hook which must be called from
    the usermodehelper exec path right before the kernel_execve, in order
    that request_module() et al done from *after* rootfs_initcall()
    time (i.e. device_ and late_ initcalls) would continue to find a
    populated initramfs as they used to.
    
    Any call of wait_for_initramfs() done before the unpacking has been
    scheduled (i.e. before rootfs_initcall time) mu...
    b234ed6d
noinitramfs.c 862 Bytes