kdb: Prevent kernel oops with kdb_defcmd
authorJason Wessel <jason.wessel@windriver.com>
Mon, 4 Feb 2013 16:35:33 +0000 (10:35 -0600)
committerJason Wessel <jason.wessel@windriver.com>
Sat, 2 Mar 2013 14:52:19 +0000 (08:52 -0600)
The kdb_defcmd can only be used to display the available command aliases
while using the kernel debug shell.  If you try to define a new macro
while the kernel debugger is active it will oops.  The debug shell
macros must use pre-allocated memory set aside at the time kdb_init()
is run, and the kdb_defcmd is restricted to only working at the time
that the kdb_init sequence is being run, which only occurs if you
actually activate the kernel debugger.

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>

No differences found