Skip to content
  • Tejun Heo's avatar
    async, kmod: warn on synchronous request_module() from async workers · 0fdff3ec
    Tejun Heo authored
    Synchronous requet_module() from an async worker can lead to deadlock
    because module init path may invoke async_synchronize_full().  The
    async worker waits for request_module() to complete and the module
    loading waits for the async task to finish.  This bug happened in the
    block layer because of default elevator auto-loading.
    
    Block layer has been updated not to do default elevator auto-loading
    and it has been decided to disallow synchronous request_module() from
    async workers.
    
    Trigger WARN_ON_ONCE() on synchronous request_module() from async
    workers.
    
    For more details, please refer to the following thread.
    
      http://thread.gmane.org/gmane.linux.kernel/1420814
    
    
    
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    Reported-by: default avatarAlex Riesen <raa.lkml@gmail.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Arjan van de Ven <arjan@linux.intel.com>
    0fdff3ec