[lkml]   [2006]   [Nov]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subject[PATCH 35/61] Fix potential interrupts during alternative patching
    -stable review patch.  If anyone has any objections, please let us know.

    From: Zachary Amsden <>

    Interrupts must be disabled during alternative instruction patching.
    On systems with high timer IRQ rates, or when running in an emulator,
    timing differences can result in random kernel panics because of
    running partially patched instructions. This doesn't yet fix NMIs,
    which requires extricating the patch code from the late bug checking
    and is logically separate (and also less likely to cause problems).

    Signed-off-by: Zachary Amsden <>
    Signed-off-by: Greg Kroah-Hartman <>
    Signed-off-by: Chris Wright <>

    arch/i386/kernel/alternative.c | 4 ++++
    1 file changed, 4 insertions(+)

    --- linux-
    +++ linux-
    @@ -344,6 +344,7 @@ void alternatives_smp_switch(int smp)

    void __init alternative_instructions(void)
    + unsigned long flags;
    if (no_replacement) {
    printk(KERN_INFO "(SMP-)alternatives turned off\n");
    free_init_pages("SMP alternatives",
    @@ -351,6 +352,8 @@ void __init alternative_instructions(voi
    (unsigned long)__smp_alt_end);
    + local_irq_save(flags);
    apply_alternatives(__alt_instructions, __alt_instructions_end);

    /* switch to patch-once-at-boottime-only mode and free the
    @@ -386,4 +389,5 @@ void __init alternative_instructions(voi
    + local_irq_restore(flags);
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2006-11-01 06:55    [W:0.020 / U:3.704 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site