Re: [patch] sti() preemption fix, 2.5.22

Ingo Molnar (mingo@elte.hu)
Mon, 17 Jun 2002 18:15:22 +0200 (CEST)


Zoltan Szalontai noticed that my patch doesnt match the bugfix described
:-)

correct patch attached.

Ingo

# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
# ChangeSet 1.510 -> 1.511
# arch/i386/kernel/irq.c 1.10 -> 1.11
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/06/17 mingo@elte.hu 1.511
# - sti() preemption fix. for real.
# --------------------------------------------
#
diff -Nru a/arch/i386/kernel/irq.c b/arch/i386/kernel/irq.c
--- a/arch/i386/kernel/irq.c Mon Jun 17 18:15:00 2002
+++ b/arch/i386/kernel/irq.c Mon Jun 17 18:15:00 2002
@@ -366,11 +366,15 @@

void __global_sti(void)
{
- int cpu = smp_processor_id();
+ int cpu;
+
+ preempt_disable();
+ cpu = smp_processor_id();

if (!local_irq_count(cpu))
release_irqlock(cpu);
__sti();
+ preempt_enable();
}

/*

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/