patch-2.1.37 linux/kernel/softirq.c

Next file: linux/kernel/sys.c
Previous file: linux/kernel/sched.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.36/linux/kernel/softirq.c linux/kernel/softirq.c
@@ -62,13 +62,14 @@
 
 asmlinkage void do_bottom_half(void)
 {
-	int cpu = smp_processor_id();
+	if (softirq_trylock()) {
+		int cpu = smp_processor_id();
 
-	if (hardirq_trylock(cpu)) {
-		if (softirq_trylock()) {
+		if (hardirq_trylock(cpu)) {
+			__sti();
 			run_bottom_halves();
-			softirq_endlock();
+			hardirq_endlock(cpu);
 		}
-		hardirq_endlock(cpu);
+		softirq_endlock();
 	}
 }

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov