Commit 3e8ebb5c433f016dff5824587436642d87fc2e6c
Committed by
Ingo Molnar
1 parent
778ef1e6cb
Exists in
master
and in
20 other branches
debug_objects: add boot-parameter toggle to turn object debugging off again
While trying to debug why my Atom netbook is falling over booting rawhide debug-enabled kernels, I stumbled across the fact that we've been enabling object debugging by default. However, once you default it to on, you've got no way to turn it back off again at runtime. Add a boolean toggle to turn it off. I would just make it an int module_param, however people may already expect the boolean enable behaviour, so just add an analogue for disabling. Signed-off-by: Kyle McMartin <kyle@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Showing 2 changed files with 11 additions and 0 deletions Side-by-side Diff
Documentation/kernel-parameters.txt
lib/debugobjects.c
... | ... | @@ -55,7 +55,15 @@ |
55 | 55 | debug_objects_enabled = 1; |
56 | 56 | return 0; |
57 | 57 | } |
58 | + | |
59 | +static int __init disable_object_debug(char *str) | |
60 | +{ | |
61 | + debug_objects_enabled = 0; | |
62 | + return 0; | |
63 | +} | |
64 | + | |
58 | 65 | early_param("debug_objects", enable_object_debug); |
66 | +early_param("no_debug_objects", disable_object_debug); | |
59 | 67 | |
60 | 68 | static const char *obj_states[ODEBUG_STATE_MAX] = { |
61 | 69 | [ODEBUG_STATE_NONE] = "none", |