Skip to content

Commit 3e8ebb5

Browse files
Kyle McMartinIngo Molnar
authored andcommitted
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>
1 parent 778ef1e commit 3e8ebb5

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

‎Documentation/kernel-parameters.txt‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -604,6 +604,9 @@ and is between 256 and 4096 characters. It is defined in the file
604604

605605
debug_objects [KNL] Enable object debugging
606606

607+
no_debug_objects
608+
[KNL] Disable object debugging
609+
607610
debugpat [X86] Enable PAT debugging
608611

609612
decnet.addr= [HW,NET]

‎lib/debugobjects.c‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,15 @@ static int __init enable_object_debug(char *str)
5555
debug_objects_enabled = 1;
5656
return 0;
5757
}
58+
59+
static int __init disable_object_debug(char *str)
60+
{
61+
debug_objects_enabled = 0;
62+
return 0;
63+
}
64+
5865
early_param("debug_objects", enable_object_debug);
66+
early_param("no_debug_objects", disable_object_debug);
5967

6068
static const char *obj_states[ODEBUG_STATE_MAX] = {
6169
[ODEBUG_STATE_NONE] = "none",

0 commit comments

Comments
 (0)