It appears that, in the preamble of register_test_dev_kmod(), mutex_lock() has been confused with mutex_unlock().
Previously, register_test_dev_kmod() never called mutex_lock() but instead, it called mutex_unlock() twice. Signed-off-by: Daniel Mentz <danielme...@google.com> Cc: Luis R. Rodriguez <mcg...@kernel.org> Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org> Cc: Andrew Morton <a...@linux-foundation.org> --- lib/test_kmod.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/test_kmod.c b/lib/test_kmod.c index 6c1d678bcf8b..f458130a5e65 100644 --- a/lib/test_kmod.c +++ b/lib/test_kmod.c @@ -1146,7 +1146,7 @@ static struct kmod_test_device *register_test_dev_kmod(void) struct kmod_test_device *test_dev = NULL; int ret; - mutex_unlock(®_dev_mutex); + mutex_lock(®_dev_mutex); /* int should suffice for number of devices, test for wrap */ if (unlikely(num_test_devs + 1) < 0) { -- 2.14.0.434.g98096fd7a8-goog