From: Ingo Molnar Date: Tue, 27 May 2008 07:56:49 +0000 (+0200) Subject: x86: ioremap fix failing nesting check X-Git-Tag: v2.6.26-rc5~5^2~6 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=226e9a93a253b7d8811b5ed9ac671c6c5a728022;p=linux-2.6 x86: ioremap fix failing nesting check Mika Kukkonen noticed that the nesting check in early_iounmap() is not actually done. Reported-by: Mika Kukkonen Signed-off-by: Ingo Molnar Cc: torvalds@linux-foundation.org Cc: arjan@linux.intel.com Cc: mikukkon@iki.fi Signed-off-by: Thomas Gleixner --- diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c index 71bb315903..2b2bb3f9b6 100644 --- a/arch/x86/mm/ioremap.c +++ b/arch/x86/mm/ioremap.c @@ -593,10 +593,11 @@ void __init early_iounmap(void *addr, unsigned long size) unsigned long offset; unsigned int nrpages; enum fixed_addresses idx; - unsigned int nesting; + int nesting; nesting = --early_ioremap_nested; - WARN_ON(nesting < 0); + if (WARN_ON(nesting < 0)) + return; if (early_ioremap_debug) { printk(KERN_INFO "early_iounmap(%p, %08lx) [%d]\n", addr,