lkml.org 
[lkml]   [2004]   [Jun]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[patch 2.6.7] bug_smp_call_function
Date
sg.c has been fixed to no longer call vfree() with interrupts disabled.
Change smp_call_function() from WARN_ON to BUG_ON when interrupts are
disabled. It was only set to WARN_ON because of sg.c.

Signed-off-by: Keith Owens <kaos@sgi.com>

Index: 2.6.7/arch/alpha/kernel/smp.c
===================================================================
--- 2.6.7.orig/arch/alpha/kernel/smp.c 2004-06-16 20:53:04.000000000 +1000
+++ 2.6.7/arch/alpha/kernel/smp.c 2004-06-19 19:25:23.000000000 +1000
@@ -821,7 +821,7 @@ smp_call_function_on_cpu (void (*func) (
int num_cpus_to_call;

/* Can deadlock when called with interrupts disabled */
- WARN_ON(irqs_disabled());
+ BUG_ON(irqs_disabled());

data.func = func;
data.info = info;
Index: 2.6.7/arch/i386/kernel/smp.c
===================================================================
--- 2.6.7.orig/arch/i386/kernel/smp.c 2004-06-16 20:53:07.000000000 +1000
+++ 2.6.7/arch/i386/kernel/smp.c 2004-06-19 19:25:25.000000000 +1000
@@ -520,7 +520,7 @@ int smp_call_function (void (*func) (voi
return 0;

/* Can deadlock when called with interrupts disabled */
- WARN_ON(irqs_disabled());
+ BUG_ON(irqs_disabled());

data.func = func;
data.info = info;
Index: 2.6.7/arch/ia64/kernel/smp.c
===================================================================
--- 2.6.7.orig/arch/ia64/kernel/smp.c 2004-06-16 20:53:09.000000000 +1000
+++ 2.6.7/arch/ia64/kernel/smp.c 2004-06-19 19:25:28.000000000 +1000
@@ -332,7 +332,7 @@ smp_call_function (void (*func) (void *i
return 0;

/* Can deadlock when called with interrupts disabled */
- WARN_ON(irqs_disabled());
+ BUG_ON(irqs_disabled());

data.func = func;
data.info = info;
Index: 2.6.7/arch/mips/kernel/smp.c
===================================================================
--- 2.6.7.orig/arch/mips/kernel/smp.c 2004-06-16 20:53:13.000000000 +1000
+++ 2.6.7/arch/mips/kernel/smp.c 2004-06-19 19:25:30.000000000 +1000
@@ -152,7 +152,7 @@ int smp_call_function (void (*func) (voi
return 0;

/* Can deadlock when called with interrupts disabled */
- WARN_ON(irqs_disabled());
+ BUG_ON(irqs_disabled());

data.func = func;
data.info = info;
Index: 2.6.7/arch/parisc/kernel/smp.c
===================================================================
--- 2.6.7.orig/arch/parisc/kernel/smp.c 2004-06-16 20:53:13.000000000 +1000
+++ 2.6.7/arch/parisc/kernel/smp.c 2004-06-19 19:25:32.000000000 +1000
@@ -326,7 +326,7 @@ smp_call_function (void (*func) (void *i
static spinlock_t lock = SPIN_LOCK_UNLOCKED;

/* Can deadlock when called with interrupts disabled */
- WARN_ON(irqs_disabled());
+ BUG_ON(irqs_disabled());

data.func = func;
data.info = info;
Index: 2.6.7/arch/ppc/kernel/smp.c
===================================================================
--- 2.6.7.orig/arch/ppc/kernel/smp.c 2004-06-16 20:53:15.000000000 +1000
+++ 2.6.7/arch/ppc/kernel/smp.c 2004-06-19 19:25:42.000000000 +1000
@@ -212,7 +212,7 @@ int smp_call_function(void (*func) (void
if (num_online_cpus() <= 1)
return 0;
/* Can deadlock when called with interrupts disabled */
- WARN_ON(irqs_disabled());
+ BUG_ON(irqs_disabled());
return __smp_call_function(func, info, wait, MSG_ALL_BUT_SELF);
}

Index: 2.6.7/arch/ppc64/kernel/smp.c
===================================================================
--- 2.6.7.orig/arch/ppc64/kernel/smp.c 2004-06-16 20:53:16.000000000 +1000
+++ 2.6.7/arch/ppc64/kernel/smp.c 2004-06-19 19:25:35.000000000 +1000
@@ -692,7 +692,7 @@ int smp_call_function (void (*func) (voi
unsigned long timeout;

/* Can deadlock when called with interrupts disabled */
- WARN_ON(irqs_disabled());
+ BUG_ON(irqs_disabled());

data.func = func;
data.info = info;
Index: 2.6.7/arch/s390/kernel/smp.c
===================================================================
--- 2.6.7.orig/arch/s390/kernel/smp.c 2004-06-16 20:53:17.000000000 +1000
+++ 2.6.7/arch/s390/kernel/smp.c 2004-06-19 19:25:47.000000000 +1000
@@ -129,7 +129,7 @@ int smp_call_function (void (*func) (voi
return 0;

/* Can deadlock when called with interrupts disabled */
- WARN_ON(irqs_disabled());
+ BUG_ON(irqs_disabled());

data.func = func;
data.info = info;
Index: 2.6.7/arch/sh/kernel/smp.c
===================================================================
--- 2.6.7.orig/arch/sh/kernel/smp.c 2004-06-16 20:53:17.000000000 +1000
+++ 2.6.7/arch/sh/kernel/smp.c 2004-06-19 19:25:50.000000000 +1000
@@ -182,7 +182,7 @@ int smp_call_function(void (*func)(void
return 0;

/* Can deadlock when called with interrupts disabled */
- WARN_ON(irqs_disabled());
+ BUG_ON(irqs_disabled());

spin_lock(&smp_fn_call.lock);

Index: 2.6.7/arch/sparc64/kernel/smp.c
===================================================================
--- 2.6.7.orig/arch/sparc64/kernel/smp.c 2004-06-16 20:53:18.000000000 +1000
+++ 2.6.7/arch/sparc64/kernel/smp.c 2004-06-19 19:25:53.000000000 +1000
@@ -602,7 +602,7 @@ int smp_call_function(void (*func)(void
return 0;

/* Can deadlock when called with interrupts disabled */
- WARN_ON(irqs_disabled());
+ BUG_ON(irqs_disabled());

data.func = func;
data.info = info;
Index: 2.6.7/arch/um/kernel/smp.c
===================================================================
--- 2.6.7.orig/arch/um/kernel/smp.c 2004-06-16 20:53:19.000000000 +1000
+++ 2.6.7/arch/um/kernel/smp.c 2004-06-19 19:26:31.000000000 +1000
@@ -267,7 +267,7 @@ int smp_call_function(void (*_func)(void
return 0;

/* Can deadlock when called with interrupts disabled */
- WARN_ON(irqs_disabled());
+ BUG_ON(irqs_disabled());

spin_lock_bh(&call_lock);
atomic_set(&scf_started, 0);
Index: 2.6.7/arch/x86_64/kernel/smp.c
===================================================================
--- 2.6.7.orig/arch/x86_64/kernel/smp.c 2004-06-16 20:53:19.000000000 +1000
+++ 2.6.7/arch/x86_64/kernel/smp.c 2004-06-19 19:26:35.000000000 +1000
@@ -405,7 +405,7 @@ int smp_call_function (void (*func) (voi
return 0;

/* Can deadlock when called with interrupts disabled */
- WARN_ON(irqs_disabled());
+ BUG_ON(irqs_disabled());

data.func = func;
data.info = info;
-
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/

\
 
 \ /
  Last update: 2005-03-22 14:03    [W:0.543 / U:1.672 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site