Skip to content

Commit

Permalink
x86: ioremap fix failing nesting check
Browse files Browse the repository at this point in the history
Mika Kukkonen noticed that the nesting check in early_iounmap() is not
actually done.

Reported-by: Mika Kukkonen <mikukkon@srv1-m700-lanp.koti>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: torvalds@linux-foundation.org
Cc: arjan@linux.intel.com
Cc: mikukkon@iki.fi
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
Ingo Molnar authored and Thomas Gleixner committed Jun 4, 2008
1 parent e8a496a commit 226e9a9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions arch/x86/mm/ioremap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 226e9a9

Please sign in to comment.