[patch] warn on release_region() from irq context
From: Ingo Molnar
Date: Sat Jan 28 2006 - 09:42:07 EST
it is not legal to call release_region() from hardirq/softirq context.
Add a WARN_ON() so that we find such cases.
Signed-off-by: Ingo Molnar <mingo@xxxxxxx>
----
kernel/resource.c | 3 +++
1 files changed, 3 insertions(+)
Index: linux/kernel/resource.c
===================================================================
--- linux.orig/kernel/resource.c
+++ linux/kernel/resource.c
@@ -18,6 +18,7 @@
#include <linux/fs.h>
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
+#include <linux/interrupt.h>
#include <asm/io.h>
@@ -486,6 +487,8 @@ void __release_region(struct resource *p
struct resource **p;
unsigned long end;
+ WARN_ON(in_interrupt());
+
p = &parent->child;
end = start + n - 1;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/