bug in kdb - patch to fix

Keith Owens kaos at sgi.com
Mon Oct 3 18:17:30 PDT 2005


On Mon, 03 Oct 2005 16:01:08 -0700, 
Steven Dake <sdake at mvista.com> wrote:
>Our QA found this problem with KDB:
>1. The target boots with KDB enabled kernel.
>2. Get KDB prompt by hitting ESC-KDB
>3. Set breakpoint (at sys_chmod)
>4. "go" on KDB prompt to come out.
>5. Verify that chmod invokes KDB.
>6. Disable KDB by echo 0 > /proc/sys/kernel/kdb
>7. Do chmod again. This results in segmentation fault.
>
>Please note that the system does not crash at this stage. However, if KDB is 
>enabled again and invoked (by ESC-KDB), it does so with message "Catastrophic 
>error detected".
>
>I've inlined a patch which fixes the problem by clearing any breakpoints when kdb is disabled.

The problem needs to be fixed, but the patch does it the wrong way.
Clearing all break points should be a simple 'kdb_parse("bc *\n", NULL);'.
Also the kdb hook into sysctl is no longer in kernel/sysctl.c, it has
been dynamic since 2.6.12-rc1.

---------------------------
Use http://oss.sgi.com/ecartis to modify your settings or to unsubscribe.


More information about the kdb mailing list