kmap leak fix for x86_32 kdump
authorFernando Luis Vázquez Cao <fernando@oss.ntt.co.jp>
Fri, 19 Oct 2007 06:39:14 +0000 (23:39 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Fri, 19 Oct 2007 18:53:33 +0000 (11:53 -0700)
copy_oldmem_page should not return leaving a page frame from the
previous kernel mapped.

Signed-off-by: Fernando Luis Vázquez Cao <fernando@oss.ntt.co.jp>
Acked-by: Vivek Goyal <vgoyal@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/x86/kernel/crash_dump_32.c

index 32e75d0731a901681c118fb073944992a082fa1c..72d0c56c1b48eff12779b557a75f3aee376c5571 100644 (file)
@@ -47,6 +47,7 @@ ssize_t copy_oldmem_page(unsigned long pfn, char *buf,
                if (!kdump_buf_page) {
                        printk(KERN_WARNING "Kdump: Kdump buffer page not"
                                " allocated\n");
+                       kunmap_atomic(vaddr, KM_PTE0);
                        return -EFAULT;
                }
                copy_page(kdump_buf_page, vaddr);