[patch] warn on release_region() from irq context

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <[email protected]>

----

 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux