[kdb] [PATCH 1/1] kdb: fix stack overflow for large NR_CPUS count
Keith Owens
kaos at ocs.com.au
Thu Oct 30 18:58:30 PDT 2008
Mike Travis (on Thu, 30 Oct 2008 18:51:58 -0700) wrote:
>The fix I implemented is to move the template to static memory and
>protect it with a spinlock. The spinlock most likely is not required
>as it's highly unlikely that two bp commands can be entered into kdb
>at the exact same time, but this definitely prevents that.
It is actually impossible. KDB stops all the cpus and only accepts
console input from one cpu at a time. The entire KDB command system is
single threaded. Ditch the spinlock, which removes the need for extra
code on the error paths.
Could you give the static template a kdb_ prefix please. Even though
template is static, it still shows up in the global kernel namespace.
Apart from that, the patch looks good.
More information about the kdb
mailing list