08 Apr, 2014

1 commit

  • Currently, booting without initrd specified on 80x25 screen gives a call
    trace followed by atkbd : Spurious ACK. Original message ("VFS: Unable
    to mount root fs") is not available. Of course this could happen in
    other situations...

    This patch displays panic reason after call trace which could help lot
    of people even if it's not the very last line on screen.

    Also, convert all panic.c printk(KERN_EMERG to pr_emerg(

    [akpm@linux-foundation.org: missed a couple of pr_ conversions]
    Signed-off-by: Fabian Frederick
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Fabian Frederick
     

07 Apr, 2014

1 commit

  • Pull module updates from Rusty Russell:
    "Nothing major: the stricter permissions checking for sysfs broke a
    staging driver; fix included. Greg KH said he'd take the patch but
    hadn't as the merge window opened, so it's included here to avoid
    breaking build"

    * tag 'modules-next-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux:
    staging: fix up speakup kobject mode
    Use 'E' instead of 'X' for unsigned module taint flag.
    VERIFY_OCTAL_PERMISSIONS: stricter checking for sysfs perms.
    kallsyms: fix percpu vars on x86-64 with relocation.
    kallsyms: generalize address range checking
    module: LLVMLinux: Remove unused function warning from __param_check macro
    Fix: module signature vs tracepoints: add new TAINT_UNSIGNED_MODULE
    module: remove MODULE_GENERIC_TABLE
    module: allow multiple calls to MODULE_DEVICE_TABLE() per module
    module: use pr_cont

    Linus Torvalds
     

01 Apr, 2014

1 commit

  • Pull x86 LTO changes from Peter Anvin:
    "More infrastructure work in preparation for link-time optimization
    (LTO). Most of these changes is to make sure symbols accessed from
    assembly code are properly marked as visible so the linker doesn't
    remove them.

    My understanding is that the changes to support LTO are still not
    upstream in binutils, but are on the way there. This patchset should
    conclude the x86-specific changes, and remaining patches to actually
    enable LTO will be fed through the Kbuild tree (other than keeping up
    with changes to the x86 code base, of course), although not
    necessarily in this merge window"

    * 'x86-asmlinkage-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (25 commits)
    Kbuild, lto: Handle basic LTO in modpost
    Kbuild, lto: Disable LTO for asm-offsets.c
    Kbuild, lto: Add a gcc-ld script to let run gcc as ld
    Kbuild, lto: add ld-version and ld-ifversion macros
    Kbuild, lto: Drop .number postfixes in modpost
    Kbuild, lto, workaround: Don't warn for initcall_reference in modpost
    lto: Disable LTO for sys_ni
    lto: Handle LTO common symbols in module loader
    lto, workaround: Add workaround for initcall reordering
    lto: Make asmlinkage __visible
    x86, lto: Disable LTO for the x86 VDSO
    initconst, x86: Fix initconst mistake in ts5500 code
    initconst: Fix initconst mistake in dcdbas
    asmlinkage: Make trace_hardirqs_on/off_caller visible
    asmlinkage, x86: Fix 32bit memcpy for LTO
    asmlinkage Make __stack_chk_failed and memcmp visible
    asmlinkage: Mark rwsem functions that can be called from assembler asmlinkage
    asmlinkage: Make main_extable_sort_needed visible
    asmlinkage, mutex: Mark __visible
    asmlinkage: Make trace_hardirq visible
    ...

    Linus Torvalds
     

31 Mar, 2014

1 commit

  • Takashi Iwai says:
    > The letter 'X' has been already used for SUSE kernels for very long
    > time, to indicate the external supported modules. Can the new flag be
    > changed to another letter for avoiding conflict...?
    > (BTW, we also use 'N' for "no support", too.)

    Note: this code should be cleaned up, so we don't have such maps in
    three places!

    Signed-off-by: Rusty Russell

    Rusty Russell
     

21 Mar, 2014

1 commit


13 Mar, 2014

1 commit

  • Users have reported being unable to trace non-signed modules loaded
    within a kernel supporting module signature.

    This is caused by tracepoint.c:tracepoint_module_coming() refusing to
    take into account tracepoints sitting within force-loaded modules
    (TAINT_FORCED_MODULE). The reason for this check, in the first place, is
    that a force-loaded module may have a struct module incompatible with
    the layout expected by the kernel, and can thus cause a kernel crash
    upon forced load of that module on a kernel with CONFIG_TRACEPOINTS=y.

    Tracepoints, however, specifically accept TAINT_OOT_MODULE and
    TAINT_CRAP, since those modules do not lead to the "very likely system
    crash" issue cited above for force-loaded modules.

    With kernels having CONFIG_MODULE_SIG=y (signed modules), a non-signed
    module is tainted re-using the TAINT_FORCED_MODULE taint flag.
    Unfortunately, this means that Tracepoints treat that module as a
    force-loaded module, and thus silently refuse to consider any tracepoint
    within this module.

    Since an unsigned module does not fit within the "very likely system
    crash" category of tainting, add a new TAINT_UNSIGNED_MODULE taint flag
    to specifically address this taint behavior, and accept those modules
    within Tracepoints. We use the letter 'X' as a taint flag character for
    a module being loaded that doesn't know how to sign its name (proposed
    by Steven Rostedt).

    Also add the missing 'O' entry to trace event show_module_flags() list
    for the sake of completeness.

    Signed-off-by: Mathieu Desnoyers
    Acked-by: Steven Rostedt
    NAKed-by: Ingo Molnar
    CC: Thomas Gleixner
    CC: David Howells
    CC: Greg Kroah-Hartman
    Signed-off-by: Rusty Russell

    Mathieu Desnoyers
     

14 Feb, 2014

1 commit

  • In LTO symbols implicitely referenced by the compiler need
    to be visible. Earlier these symbols were visible implicitely
    from being exported, but we disabled implicit visibility fo
    EXPORTs when modules are disabled to improve code size. So
    now these symbols have to be marked visible explicitely.

    Do this for __stack_chk_fail (with stack protector)
    and memcmp.

    Signed-off-by: Andi Kleen
    Link: http://lkml.kernel.org/r/1391845930-28580-10-git-send-email-ak@linux.intel.com
    Signed-off-by: H. Peter Anvin

    Andi Kleen
     

26 Nov, 2013

1 commit

  • The panic_timeout value can be set via the command line option
    'panic=x', or via /proc/sys/kernel/panic, however that is not
    sufficient when the panic occurs before we are able to set up
    these values. Thus, add a CONFIG_PANIC_TIMEOUT so that we can
    set the desired value from the .config.

    The default panic_timeout value continues to be 0 - wait
    forever. Also adds set_arch_panic_timeout(new_timeout,
    arch_default_timeout), which is intended to be used by arches in
    arch_setup(). The idea being that the new_timeout is only set if
    the user hasn't changed from the arch_default_timeout.

    Signed-off-by: Jason Baron
    Cc: benh@kernel.crashing.org
    Cc: paulus@samba.org
    Cc: ralf@linux-mips.org
    Cc: mpe@ellerman.id.au
    Cc: felipe.contreras@gmail.com
    Cc: Linus Torvalds
    Cc: Andrew Morton
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/1a1674daec27c534df409697025ac568ebcee91e.1385418410.git.jbaron@akamai.com
    Signed-off-by: Ingo Molnar

    Jason Baron
     

13 Nov, 2013

1 commit


12 Sep, 2013

1 commit

  • Since the panic handlers may produce additional information (via printk)
    for the kernel log, it should be reported as part of the panic output
    saved by kmsg_dump(). Without this re-ordering, nothing that adds
    information to a panic will show up in pstore's view when kmsg_dump runs,
    and is therefore not visible to crash reporting tools that examine pstore
    output.

    Signed-off-by: Kees Cook
    Cc: Anton Vorontsov
    Cc: Colin Cross
    Acked-by: Tony Luck
    Cc: Stephen Boyd
    Cc: Vikram Mulukutla
    Cc: Peter Zijlstra
    Cc: Rusty Russell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kees Cook
     

12 Jul, 2013

1 commit

  • Pull tracing changes from Steven Rostedt:
    "The majority of the changes here are cleanups for the large changes
    that were added to 3.10, which includes several bug fixes that have
    been marked for stable.

    As for new features, there were a few, but nothing to write to LWN
    about. These include:

    New function trigger called "dump" and "cpudump" that will cause
    ftrace to dump its buffer to the console when the function is called.
    The difference between "dump" and "cpudump" is that "dump" will dump
    the entire contents of the ftrace buffer, where as "cpudump" will only
    dump the contents of the ftrace buffer for the CPU that called the
    function.

    Another small enhancement is a new sysctl switch called
    "traceoff_on_warning" which, when enabled, will disable tracing if any
    WARN_ON() is triggered. This is useful if you want to debug what
    caused a warning and do not want to risk losing your trace data by the
    ring buffer overwriting the data before you can disable it. There's
    also a kernel command line option that will make this enabled at boot
    up called the same thing"

    * tag 'trace-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace: (34 commits)
    tracing: Make tracing_open_generic_{tr,tc}() static
    tracing: Remove ftrace() function
    tracing: Remove TRACE_EVENT_TYPE enum definition
    tracing: Make tracer_tracing_{off,on,is_on}() static
    tracing: Fix irqs-off tag display in syscall tracing
    uprobes: Fix return value in error handling path
    tracing: Fix race between deleting buffer and setting events
    tracing: Add trace_array_get/put() to event handling
    tracing: Get trace_array ref counts when accessing trace files
    tracing: Add trace_array_get/put() to handle instance refs better
    tracing: Protect ftrace_trace_arrays list in trace_events.c
    tracing: Make trace_marker use the correct per-instance buffer
    ftrace: Do not run selftest if command line parameter is set
    tracing/kprobes: Don't pass addr=ip to perf_trace_buf_submit()
    tracing: Use flag buffer_disabled for irqsoff tracer
    tracing/kprobes: Turn trace_probe->files into list_head
    tracing: Fix disabling of soft disable
    tracing: Add missing syscall_metadata comment
    tracing: Simplify code for showing of soft disabled flag
    tracing/kprobes: Kill probe_enable_lock
    ...

    Linus Torvalds
     

10 Jul, 2013

1 commit


20 Jun, 2013

1 commit

  • Add a traceoff_on_warning option in both the kernel command line as well
    as a sysctl option. When set, any WARN*() function that is hit will cause
    the tracing_on variable to be cleared, which disables writing to the
    ring buffer.

    This is useful especially when tracing a bug with function tracing. When
    a warning is hit, the print caused by the warning can flood the trace with
    the functions that producing the output for the warning. This can make the
    resulting trace useless by either hiding where the bug happened, or worse,
    by overflowing the buffer and losing the trace of the bug totally.

    Acked-by: Peter Zijlstra
    Signed-off-by: Steven Rostedt

    Steven Rostedt (Red Hat)
     

01 May, 2013

1 commit

  • x86 and ia64 can acquire extra hardware identification information
    from DMI and print it along with task dumps; however, the usage isn't
    consistent.

    * x86 show_regs() collects vendor, product and board strings and print
    them out with PID, comm and utsname. Some of the information is
    printed again later in the same dump.

    * warn_slowpath_common() explicitly accesses the DMI board and prints
    it out with "Hardware name:" label. This applies to both x86 and
    ia64 but is irrelevant on all other archs.

    * ia64 doesn't show DMI information on other non-WARN dumps.

    This patch introduces arch-specific hardware description used by
    dump_stack(). It can be set by calling dump_stack_set_arch_desc()
    during boot and, if exists, printed out in a separate line with
    "Hardware name:" label.

    dmi_set_dump_stack_arch_desc() is added which sets arch-specific
    description from DMI data. It uses dmi_ids_string[] which is set from
    dmi_present() used for DMI debug message. It is superset of the
    information x86 show_regs() is using. The function is called from x86
    and ia64 boot code right after dmi_scan_machine().

    This makes the explicit DMI handling in warn_slowpath_common()
    unnecessary. Removed.

    show_regs() isn't yet converted to use generic debug information
    printing and this patch doesn't remove the duplicate DMI handling in
    x86 show_regs(). The next patch will unify show_regs() handling and
    remove the duplication.

    An example WARN dump follows.

    WARNING: at kernel/workqueue.c:4841 init_workqueues+0x35/0x505()
    Modules linked in:
    CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.9.0-rc1-work+ #3
    Hardware name: empty empty/S3992, BIOS 080011 10/26/2007
    0000000000000009 ffff88007c861e08 ffffffff81c614dc ffff88007c861e48
    ffffffff8108f500 ffffffff82228240 0000000000000040 ffffffff8234a08e
    0000000000000000 0000000000000000 0000000000000000 ffff88007c861e58
    Call Trace:
    [] dump_stack+0x19/0x1b
    [] warn_slowpath_common+0x70/0xa0
    [] warn_slowpath_null+0x1a/0x20
    [] init_workqueues+0x35/0x505
    ...

    v2: Use the same string as the debug message from dmi_present() which
    also contains BIOS information. Move hardware name into its own
    line as warn_slowpath_common() did. This change was suggested by
    Bjorn Helgaas.

    Signed-off-by: Tejun Heo
    Cc: Bjorn Helgaas
    Cc: David S. Miller
    Cc: Fengguang Wu
    Cc: Heiko Carstens
    Cc: Jesper Nilsson
    Cc: Martin Schwidefsky
    Cc: Mike Frysinger
    Cc: Vineet Gupta
    Cc: Sam Ravnborg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tejun Heo
     

21 Jan, 2013

1 commit


31 Jul, 2012

1 commit

  • panic_lock is meant to ensure that panic processing takes place only on
    one cpu; if any of the other cpus encounter a panic, they will spin
    waiting to be shut down.

    However, this causes a regression in this scenario:

    1. Cpu 0 encounters a panic and acquires the panic_lock
    and proceeds with the panic processing.
    2. There is an interrupt on cpu 0 that also encounters
    an error condition and invokes panic.
    3. This second invocation fails to acquire the panic_lock
    and enters the infinite while loop in panic_smp_self_stop.

    Thus all panic processing is stopped, and the cpu is stuck for eternity
    in the while(1) inside panic_smp_self_stop.

    To address this, disable local interrupts with local_irq_disable before
    acquiring the panic_lock. This will prevent interrupt handlers from
    executing during the panic processing, thus avoiding this particular
    problem.

    Signed-off-by: Vikram Mulukutla
    Reviewed-by: Stephen Boyd
    Cc: Michael Holzheu
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vikram Mulukutla
     

18 May, 2012

1 commit

  • This patch moves kmsg_dump(KMSG_DUMP_PANIC) below smp_send_stop(),
    to serialize the crash-logging process via smp_send_stop() and to
    thus retrieve a more stable crash image of all CPUs stopped.

    Signed-off-by: Seiji Aguchi
    Acked-by: Don Zickus
    Cc: dle-develop@lists.sourceforge.net
    Cc: Satoru Moriya
    Cc: Tony Luck
    Cc: a.p.zijlstra@chello.nl
    Link: http://lkml.kernel.org/r/5C4C569E8A4B9B42A84A977CF070A35B2E4D7A5CE2@USINDEVS01.corp.hds.com
    Signed-off-by: Ingo Molnar

    Seiji Aguchi
     

07 May, 2012

1 commit

  • Several distros set this by default by patching panic_on_oops.
    It seems to fit with the BOOTPARAM_{HARD,SOFT}_PANIC options
    though, so let's add a Kconfig entry and reduce some more
    upstream delta.

    Signed-off-by: Kyle McMartin
    Cc: Andrew Morton
    Cc: Linus Torvalds
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/20120411121529.GH26688@redacted.bos.redhat.com
    Signed-off-by: Ingo Molnar

    Kyle McMartin
     

13 Apr, 2012

1 commit

  • Commit 6e6f0a1f0fa6 ("panic: don't print redundant backtraces on oops")
    causes a regression where no stack trace will be printed at all for the
    case where kernel code calls panic() directly while not processing an
    oops, and of course there are 100's of instances of this type of call.

    The original commit executed the check (!oops_in_progress), but this will
    always be false because just before the dump_stack() there is a call to
    bust_spinlocks(1), which does the following:

    void __attribute__((weak)) bust_spinlocks(int yes)
    {
    if (yes) {
    ++oops_in_progress;

    The proper way to resolve the problem that original commit tried to
    solve is to avoid printing a stack dump from panic() when the either of
    the following conditions is true:

    1) TAINT_DIE has been set (this is done by oops_end())
    This indicates and oops has already been printed.
    2) oops_in_progress > 1
    This guards against the rare case where panic() is invoked
    a second time, or in between oops_begin() and oops_end()

    Signed-off-by: Jason Wessel
    Cc: Andi Kleen
    Cc: [3.3+]
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jason Wessel
     

13 Jan, 2012

3 commits

  • When an oops causes a panic and panic prints another backtrace it's pretty
    common to have the original oops data be scrolled away on a 80x50 screen.

    The second backtrace is quite redundant and not needed anyways.

    So don't print the panic backtrace when oops_in_progress is true.

    [akpm@linux-foundation.org: add comment]
    Signed-off-by: Andi Kleen
    Cc: Michael Holzheu
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andi Kleen
     
  • When two CPUs call panic at the same time there is a possible race
    condition that can stop kdump. The first CPU calls crash_kexec() and the
    second CPU calls smp_send_stop() in panic() before crash_kexec() finished
    on the first CPU. So the second CPU stops the first CPU and therefore
    kdump fails:

    1st CPU:
    panic()->crash_kexec()->mutex_trylock(&kexec_mutex)-> do kdump

    2nd CPU:
    panic()->crash_kexec()->kexec_mutex already held by 1st CPU
    ->smp_send_stop()-> stop 1st CPU (stop kdump)

    This patch fixes the problem by introducing a spinlock in panic that
    allows only one CPU to process crash_kexec() and the subsequent panic
    code.

    All other CPUs call the weak function panic_smp_self_stop() that stops the
    CPU itself. This function can be overloaded by architecture code. For
    example "tile" can use their lower-power "nap" instruction for that.

    Signed-off-by: Michael Holzheu
    Acked-by: Chris Metcalf
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michael Holzheu
     
  • It's a very old and now unused prototype marking so just delete it.

    Neaten panic pointer argument style to keep checkpatch quiet.

    Signed-off-by: Joe Perches
    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Cc: Haavard Skinnemoen
    Cc: Hans-Christian Egtvedt
    Cc: Tony Luck
    Cc: Fenghua Yu
    Acked-by: Geert Uytterhoeven
    Acked-by: Ralf Baechle
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Cc: Chris Metcalf
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Joe Perches
     

08 Dec, 2011

1 commit

  • We do want to allow lock debugging for GPL-compatible modules
    that are not (yet) built in-tree. This was disabled as a
    side-effect of commit 2449b8ba0745327c5fa49a8d9acffe03b2eded69
    ('module,bug: Add TAINT_OOT_MODULE flag for modules not built
    in-tree'). Lock debug warnings now include taint flags, so
    kernel developers should still be able to deflect warnings
    caused by out-of-tree modules.

    The TAINT_PROPRIETARY_MODULE flag for non-GPL-compatible modules
    will still disable lock debugging.

    Signed-off-by: Ben Hutchings
    Cc: Nick Bowler
    Cc: Greg KH
    Cc: Dave Jones
    Cc: Rusty Russell
    Cc: Randy Dunlap
    Cc: Debian kernel maintainers
    Cc: Peter Zijlstra
    Cc: Alan Cox
    Link: http://lkml.kernel.org/r/1323268258.18450.11.camel@deadeye
    Signed-off-by: Ingo Molnar

    Ben Hutchings
     

06 Dec, 2011

1 commit

  • It's unlikely that TAINT_FIRMWARE_WORKAROUND causes false
    lockdep messages, so do not disable lockdep in that case.
    We still want to keep lockdep disabled in the
    TAINT_OOT_MODULE case:

    - bin-only modules can cause various instabilities in
    their and in unrelated kernel code

    - they are impossible to debug for kernel developers

    - they also typically do not have the copyright license
    permission to link to the GPL-ed lockdep code.

    Suggested-by: Ben Hutchings
    Signed-off-by: Peter Zijlstra
    Link: http://lkml.kernel.org/n/tip-xopopjjens57r0i13qnyh2yo@git.kernel.org
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     

07 Nov, 2011

1 commit

  • Use of the GPL or a compatible licence doesn't necessarily make the code
    any good. We already consider staging modules to be suspect, and this
    should also be true for out-of-tree modules which may receive very
    little review.

    Signed-off-by: Ben Hutchings
    Reviewed-by: Dave Jones
    Acked-by: Greg Kroah-Hartman
    Signed-off-by: Rusty Russell (patched oops-tracing.txt)

    Ben Hutchings
     

27 Jul, 2011

1 commit

  • When a kernel BUG or oops occurs, ChromeOS intends to panic and
    immediately reboot, with stacktrace and other messages preserved in RAM
    across reboot.

    But the longer we delay, the more likely the user is to poweroff and
    lose the info.

    panic_timeout (seconds before rebooting) is set by panic= boot option or
    sysctl or /proc/sys/kernel/panic; but 0 means wait forever, so at
    present we have to delay at least 1 second.

    Let a negative number mean reboot immediately (with the small cosmetic
    benefit of suppressing that newline-less "Rebooting in %d seconds.."
    message).

    Signed-off-by: Hugh Dickins
    Signed-off-by: Mandeep Singh Baines
    Cc: Huang Ying
    Cc: Andi Kleen
    Cc: Hugh Dickins
    Cc: Olaf Hering
    Cc: Jesse Barnes
    Cc: Dave Airlie
    Cc: Greg Kroah-Hartman
    Cc: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hugh Dickins
     

23 Mar, 2011

1 commit


12 Jan, 2011

1 commit

  • Generic Hardware Error Source provides a way to report platform
    hardware errors (such as that from chipset). It works in so called
    "Firmware First" mode, that is, hardware errors are reported to
    firmware firstly, then reported to Linux by firmware. This way, some
    non-standard hardware error registers or non-standard hardware link
    can be checked by firmware to produce more valuable hardware error
    information for Linux.

    This patch adds POLL/IRQ/NMI notification types support.

    Because the memory area used to transfer hardware error information
    from BIOS to Linux can be determined only in NMI, IRQ or timer
    handler, but general ioremap can not be used in atomic context, so a
    special version of atomic ioremap is implemented for that.

    Known issue:

    - Error information can not be printed for recoverable errors notified
    via NMI, because printk is not NMI-safe. Will fix this via delay
    printing to IRQ context via irq_work or make printk NMI-safe.

    v2:

    - adjust printk format per comments.

    Signed-off-by: Huang Ying
    Reviewed-by: Andi Kleen
    Signed-off-by: Len Brown

    Huang Ying
     

11 Aug, 2010

2 commits

  • We are missing the oops end marker for the exception based WARN implementation
    in lib/bug.c. This is useful for logfile analysis tools.

    Signed-off-by: Anton Blanchard
    Cc: Ingo Molnar
    Cc: Arjan van de Ven
    Cc: "Kirill A. Shutemov"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Anton Blanchard
     
  • To keep panic_timeout accuracy when running under a hypervisor, the
    current implementation only spins on long time (1 second) calls to mdelay.
    That brings a good effect, but the problem is the keyboard LEDs don't
    blink at all on that situation.

    This patch changes to call to panic_blink_enter() between every mdelay and
    keeps blinking in spite of long spin timer mode.

    The time to call to mdelay is now 100ms. Even this change will keep
    panic_timeout accuracy enough when running under a hypervisor.

    Signed-off-by: TAMUKI Shoichi
    Cc: Ben Dooks
    Cc: Russell King
    Acked-by: Dmitry Torokhov
    Cc: Anton Blanchard
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    TAMUKI Shoichi
     

28 May, 2010

1 commit

  • Most distros turn the console verbosity down and that means a backtrace
    after a panic never makes it to the console. I assume we haven't seen
    this because a panic is often preceeded by an oops which will have called
    console_verbose. There are however a lot of places we call panic
    directly, and they are broken.

    Use console_verbose like we do in the oops path to ensure a directly
    called panic will print a backtrace.

    Signed-off-by: Anton Blanchard
    Acked-by: Greg Kroah-Hartman
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Anton Blanchard
     

19 May, 2010

2 commits

  • This taint flag will initially be used when warning about invalid ACPI
    DMAR tables.

    Signed-off-by: Ben Hutchings
    Signed-off-by: David Woodhouse

    Ben Hutchings
     
  • WARN() is used in some places to report firmware or hardware bugs that
    are then worked-around. These bugs do not affect the stability of the
    kernel and should not set the flag for TAINT_WARN. To allow for this,
    add WARN_TAINT() and WARN_TAINT_ONCE() macros that take a taint number
    as argument.

    Architectures that implement warnings using trap instructions instead
    of calls to warn_slowpath_*() now implement __WARN_TAINT(taint)
    instead of __WARN().

    Signed-off-by: Ben Hutchings
    Acked-by: Helge Deller
    Tested-by: Paul Mundt
    Signed-off-by: David Woodhouse

    Ben Hutchings
     

07 Mar, 2010

1 commit

  • I've had some complaints about panic_timeout being wildly innacurate on
    shared processor PowerPC partitions (a 3 minute panic_timeout taking 30
    minutes).

    The problem is we loop on mdelay(1) and with a 1ms in 10ms hypervisor
    timeslice each of these will take 10ms (ie 10x) longer. I expect other
    platforms with shared processor hypervisors will see the same issue.

    This patch keeps the old behaviour if we have a panic_blink (only keyboard
    LEDs right now) and does 1 second mdelays if we don't.

    Signed-off-by: Anton Blanchard
    Cc: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Anton Blanchard
     

01 Jan, 2010

1 commit

  • crash_kexec gets called before kmsg_dump(KMSG_DUMP_OOPS) if
    panic_on_oops is set, so the kernel log buffer is not stored
    for this case.

    This patch adds a KMSG_DUMP_KEXEC dump type which gets called
    when crash_kexec() is invoked. To avoid getting double dumps,
    the old KMSG_DUMP_PANIC is moved below crash_kexec(). The
    mtdoops driver is modified to handle KMSG_DUMP_KEXEC in the
    same way as a panic.

    Signed-off-by: KOSAKI Motohiro
    Acked-by: Simon Kagstrom
    Signed-off-by: David Woodhouse

    KOSAKI Motohiro
     

17 Dec, 2009

1 commit

  • * git://git.infradead.org/mtd-2.6: (90 commits)
    jffs2: Fix long-standing bug with symlink garbage collection.
    mtd: OneNAND: Fix test of unsigned in onenand_otp_walk()
    mtd: cfi_cmdset_0002, fix lock imbalance
    Revert "mtd: move mxcnd_remove to .exit.text"
    mtd: m25p80: add support for Macronix MX25L4005A
    kmsg_dump: fix build for CONFIG_PRINTK=n
    mtd: nandsim: add support for 4KiB pages
    mtd: mtdoops: refactor as a kmsg_dumper
    mtd: mtdoops: make record size configurable
    mtd: mtdoops: limit the maximum mtd partition size
    mtd: mtdoops: keep track of used/unused pages in an array
    mtd: mtdoops: several minor cleanups
    core: Add kernel message dumper to call on oopses and panics
    mtd: add ARM pismo support
    mtd: pxa3xx_nand: Fix PIO data transfer
    mtd: nand: fix multi-chip suspend problem
    mtd: add support for switching old SST chips into QRY mode
    mtd: fix M29W800D dev_id and uaddr
    mtd: don't use PF_MEMALLOC
    mtd: Add bad block table overrides to Davinci NAND driver
    ...

    Fixed up conflicts (mostly trivial) in
    drivers/mtd/devices/m25p80.c
    drivers/mtd/maps/pcmciamtd.c
    drivers/mtd/nand/pxa3xx_nand.c
    kernel/printk.c

    Linus Torvalds
     

30 Nov, 2009

1 commit

  • The core functionality is implemented as per Linus suggestion from

    http://lists.infradead.org/pipermail/linux-mtd/2009-October/027620.html

    (with the kmsg_dump implementation by Linus). A struct kmsg_dumper has
    been added which contains a callback to dump the kernel log buffers on
    crashes. The kmsg_dump function gets called from oops_exit() and panic()
    and invokes this callbacks with the crash reason.

    [dwmw2: Fix log_end handling]
    Signed-off-by: Simon Kagstrom
    Reviewed-by: Anders Grafstrom
    Reviewed-by: Linus Torvalds
    Acked-by: Ingo Molnar
    Signed-off-by: Artem Bityutskiy
    Signed-off-by: David Woodhouse

    Simon Kagstrom
     

09 Oct, 2009

1 commit

  • …/git/tip/linux-2.6-tip

    * 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    futex: fix requeue_pi key imbalance
    futex: Fix typo in FUTEX_WAIT/WAKE_BITSET_PRIVATE definitions
    rcu: Place root rcu_node structure in separate lockdep class
    rcu: Make hot-unplugged CPU relinquish its own RCU callbacks
    rcu: Move rcu_barrier() to rcutree
    futex: Move exit_pi_state() call to release_mm()
    futex: Nullify robust lists after cleanup
    futex: Fix locking imbalance
    panic: Fix panic message visibility by calling bust_spinlocks(0) before dying
    rcu: Replace the rcu_barrier enum with pointer to call_rcu*() function
    rcu: Clean up code based on review feedback from Josh Triplett, part 4
    rcu: Clean up code based on review feedback from Josh Triplett, part 3
    rcu: Fix rcu_lock_map build failure on CONFIG_PROVE_LOCKING=y
    rcu: Clean up code to address Ingo's checkpatch feedback
    rcu: Clean up code based on review feedback from Josh Triplett, part 2
    rcu: Clean up code based on review feedback from Josh Triplett

    Linus Torvalds
     

06 Oct, 2009

1 commit

  • Commit ffd71da4e3f ("panic: decrease oops_in_progress only after
    having done the panic") moved bust_spinlocks(0) to the end of the
    function, which in practice is never reached.

    As a result console_unblank() is not called, and on some systems
    the user may not see the panic message.

    Move it back up to before the unblanking.

    Signed-off-by: Aaro Koskinen
    Reviewed-by: Frederic Weisbecker
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Aaro Koskinen
     

21 Sep, 2009

1 commit