]> git.karo-electronics.de Git - karo-tx-linux.git/commit
kdb: A fix for kdb command table expansion
authorJohn Blackwood <john.blackwood@ccur.com>
Mon, 10 Dec 2012 21:37:22 +0000 (15:37 -0600)
committerJason Wessel <jason.wessel@windriver.com>
Sat, 2 Mar 2013 14:39:06 +0000 (08:39 -0600)
commit3af1ff4515555357bd42f8181cdc46b923ba9536
treec2173f7fe33c6a05c28d1e6d9c57c0c85dd5f4f1
parentb0af9cd9aab60ceb17d3ebabb9fdf4ff0a99cf50
kdb: A fix for kdb command table expansion

When locally adding in some additional kdb commands, I stumbled
across an issue with the dynamic expansion of the kdb command table.
When the number of kdb commands exceeds the size of the statically
allocated kdb_base_commands[] array, additional space is allocated in
the kdb_register_repeat() routine.

The unused portion of the newly allocated array was not being initialized
to zero properly and this would result in segfaults when help '?' was
executed or when a search for a non-existing command would traverse the
command table beyond the end of valid command entries and then attempt
to use the non-zeroed area as actual command entries.

Signed-off-by: John Blackwood <john.blackwood@ccur.com>
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
kernel/debug/kdb/kdb_main.c