[PATCH] kmap leak fix for x86_32 kdump

Vivek Goyal vgoyal at in.ibm.com
Thu Oct 18 08:21:03 EDT 2007


On Thu, Oct 18, 2007 at 08:10:16PM +0900, Fernando Luis Vázquez Cao wrote:
> copy_oldmem_page should not return leaving a page frame from the
> previous kernel mapped.
> 
> Signed-off-by: Fernando Luis Vazquez Cao <fernando at oss.ntt.co.jp>
> ---
> 
> diff -urNp linux-2.6.23-git13-orig/arch/x86/kernel/crash_dump_32.c linux-2.6.23-git13/arch/x86/kernel/crash_dump_32.c
> --- linux-2.6.23-git13-orig/arch/x86/kernel/crash_dump_32.c	2007-10-18 19:42:54.000000000 +0900
> +++ linux-2.6.23-git13/arch/x86/kernel/crash_dump_32.c	2007-10-18 19:49:25.000000000 +0900
> @@ -47,6 +47,7 @@ ssize_t copy_oldmem_page(unsigned long p
>  		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);
>

Thanks Fernando. This makes sense.

Vivek
 



More information about the kexec mailing list