diff options
author | Luis R. Rodriguez <[email protected]> | 2017-08-18 15:15:58 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2017-08-18 15:32:01 -0700 |
commit | 2ba293c9e7db150943f06b12d3eb7213e7fae624 (patch) | |
tree | cfb1356e158aa173014f9b3b364309eefc5d0d61 /lib/memory-notifier-error-inject.c | |
parent | 8ada92799ec4de00f4bc0f10b1ededa256c1ab22 (diff) |
kmod: fix wait on recursive loop
Recursive loops with module loading were previously handled in kmod by
restricting the number of modprobe calls to 50 and if that limit was
breached request_module() would return an error and a user would see the
following on their kernel dmesg:
request_module: runaway loop modprobe binfmt-464c
Starting init:/sbin/init exists but couldn't execute it (error -8)
This issue could happen for instance when a 64-bit kernel boots a 32-bit
userspace on some architectures and has no 32-bit binary format
hanlders. This is visible, for instance, when a CONFIG_MODULES enabled
64-bit MIPS kernel boots a into o32 root filesystem and the binfmt
handler for o32 binaries is not built-in.
After commit 6d7964a722af ("kmod: throttle kmod thread limit") we now
don't have any visible signs of an error and the kernel just waits for
the loop to end somehow.
Although this *particular* recursive loop could also be addressed by
doing a sanity check on search_binary_handler() and disallowing a
modular binfmt to be required for modprobe, a generic solution for any
recursive kernel kmod issues is still needed.
This should catch these loops. We can investigate each loop and address
each one separately as they come in, this however puts a stop gap for
them as before.
Link: http://lkml.kernel.org/r/[email protected]
Fixes: 6d7964a722af ("kmod: throttle kmod thread limit")
Signed-off-by: Luis R. Rodriguez <[email protected]>
Reported-by: Matt Redfearn <[email protected]>
Tested-by: Matt Redfearn <[email protected]>
Cc: "Eric W. Biederman" <[email protected]>
Cc: Colin Ian King <[email protected]>
Cc: Dan Carpenter <[email protected]>
Cc: Daniel Mentz <[email protected]>
Cc: David Binderman <[email protected]>
Cc: Dmitry Torokhov <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Jessica Yu <[email protected]>
Cc: Josh Poimboeuf <[email protected]>
Cc: Kees Cook <[email protected]>
Cc: Michal Marek <[email protected]>
Cc: Miroslav Benes <[email protected]>
Cc: Peter Zijlstra (Intel) <[email protected]>
Cc: Petr Mladek <[email protected]>
Cc: Rusty Russell <[email protected]>
Cc: Shuah Khan <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'lib/memory-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions