diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2010-05-19 17:33:39 -0600 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2010-05-19 17:33:39 +0930 |
commit | 480b02df3aa9f07d1c7df0cd8be7a5ca73893455 (patch) | |
tree | 27b51ecc15bb30b0d79bb0c702a0124c8b4848fc /scripts/mod | |
parent | fedb3d27d9e8606b3867b5ae49d6258458a07a72 (diff) | |
download | op-kernel-dev-480b02df3aa9f07d1c7df0cd8be7a5ca73893455.zip op-kernel-dev-480b02df3aa9f07d1c7df0cd8be7a5ca73893455.tar.gz |
module: drop the lock while waiting for module to complete initialization.
This fixes "gave up waiting for init of module libcrc32c." which
happened at boot time due to multiple parallel module loads.
The problem was a deadlock: we wait for a module to finish
initializing, but we keep the module_lock mutex so it can't complete.
In particular, this could reasonably happen if a module does a
request_module() in its initialization routine.
So we change use_module() to return an errno rather than a bool, and if
it's -EBUSY we drop the lock and wait in the caller, then reaquire the
lock.
Reported-by: Brandon Philips <brandon@ifup.org>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Tested-by: Brandon Philips <brandon@ifup.org>
Diffstat (limited to 'scripts/mod')
0 files changed, 0 insertions, 0 deletions