diff options
author | Andrew Morton <akpm@osdl.org> | 2005-07-07 20:56:02 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-07 21:23:35 -0400 |
commit | c23a4e9649f80a9379d7df4a33bc63b365d5e7fc (patch) | |
tree | 89fb4aae49a2fc7181aade9e1dae34b1cc145a54 /arch | |
parent | eda80228860641b7b0e963e6bd219b960c500af9 (diff) |
[PATCH] iounmap debugging
We get sporadic reports of `__iounmap: bad address' coming out. Add a
dump_stack() to find the culprit.
Try to identify which subsystem is having iounmap() problems.
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/i386/mm/ioremap.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/i386/mm/ioremap.c b/arch/i386/mm/ioremap.c index 6b25afc933b6..f379b8d67558 100644 --- a/arch/i386/mm/ioremap.c +++ b/arch/i386/mm/ioremap.c | |||
@@ -228,7 +228,8 @@ EXPORT_SYMBOL(ioremap_nocache); | |||
228 | void iounmap(volatile void __iomem *addr) | 228 | void iounmap(volatile void __iomem *addr) |
229 | { | 229 | { |
230 | struct vm_struct *p; | 230 | struct vm_struct *p; |
231 | if ((void __force *) addr <= high_memory) | 231 | |
232 | if ((void __force *)addr <= high_memory) | ||
232 | return; | 233 | return; |
233 | 234 | ||
234 | /* | 235 | /* |
@@ -241,9 +242,10 @@ void iounmap(volatile void __iomem *addr) | |||
241 | return; | 242 | return; |
242 | 243 | ||
243 | write_lock(&vmlist_lock); | 244 | write_lock(&vmlist_lock); |
244 | p = __remove_vm_area((void *) (PAGE_MASK & (unsigned long __force) addr)); | 245 | p = __remove_vm_area((void *)(PAGE_MASK & (unsigned long __force)addr)); |
245 | if (!p) { | 246 | if (!p) { |
246 | printk(KERN_WARNING "iounmap: bad address %p\n", addr); | 247 | printk(KERN_WARNING "iounmap: bad address %p\n", addr); |
248 | dump_stack(); | ||
247 | goto out_unlock; | 249 | goto out_unlock; |
248 | } | 250 | } |
249 | 251 | ||