All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] warn on release_region() from irq context
@ 2006-01-28 14:43 Ingo Molnar
  2006-01-28 15:00 ` Ingo Molnar
  0 siblings, 1 reply; 4+ messages in thread
From: Ingo Molnar @ 2006-01-28 14:43 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel

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@elte.hu>

----

 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;
 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-01-29 13:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-28 14:43 [patch] warn on release_region() from irq context Ingo Molnar
2006-01-28 15:00 ` Ingo Molnar
2006-01-28 16:02   ` Ingo Molnar
2006-01-29 13:06   ` Ingo Molnar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.