lkml.org 
[lkml]   [2010]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 26/28] kdb,panic,debug_core: Allow the debug core to receive a panic before smp_send_stop()
    On Fri, 12 Feb 2010 16:35:41 -0600 Jason Wessel <jason.wessel@windriver.com> wrote:

    > It is highly desirable to trap into kdb on panic,

    s/kdb/kgdb/

    But is it necessary to do it in-kernel? Why not just put a
    breakpoint at panic(), add that to your .gdbinit?

    > diff --git a/kernel/panic.c b/kernel/panic.c
    > index c787333..428d15b 100644
    > --- a/kernel/panic.c
    > +++ b/kernel/panic.c
    > @@ -66,10 +66,13 @@ NORET_TYPE void panic(const char * fmt, ...)
    > */
    > preempt_disable();
    >
    > - bust_spinlocks(1);
    > va_start(args, fmt);
    > vsnprintf(buf, sizeof(buf), fmt, args);
    > va_end(args);
    > +
    > + atomic_notifier_call_chain(&panic_notifier_list, 0, buf);
    > +
    > + bust_spinlocks(1);
    > printk(KERN_EMERG "Kernel panic - not syncing: %s\n",buf);
    > #ifdef CONFIG_DEBUG_BUGVERBOSE
    > dump_stack();
    > @@ -91,8 +94,6 @@ NORET_TYPE void panic(const char * fmt, ...)
    > */
    > smp_send_stop();
    >
    > - atomic_notifier_call_chain(&panic_notifier_list, 0, buf);
    > -
    > bust_spinlocks(0);
    >
    > if (!panic_blink)

    So the notifier call now happens before all the printks and the kexec
    and kmsg_dump handling. What effect does this have upon the code which
    implements kexec and kmsg_dump?



    \
     
     \ /
      Last update: 2010-02-13 00:03    [W:4.333 / U:0.748 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site