[RFC/PATCH 11/17][Kdump] Routines for copying dump pages fixes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Signed-off-by: Andrew Morton <[email protected]>
---

 25-akpm/kernel/crash_dump.c |    5 ++++-
 arch/i386/mm/highmem.c      |    0 
 include/asm-i386/highmem.h  |    0 
 include/linux/highmem.h     |    0 
 4 files changed, 4 insertions(+), 1 deletion(-)

diff -puN arch/i386/mm/highmem.c~crashdump-routines-for-copying-dump-pages-fixes arch/i386/mm/highmem.c
diff -puN include/asm-i386/highmem.h~crashdump-routines-for-copying-dump-pages-fixes include/asm-i386/highmem.h
diff -puN include/linux/highmem.h~crashdump-routines-for-copying-dump-pages-fixes include/linux/highmem.h
diff -puN kernel/crash_dump.c~crashdump-routines-for-copying-dump-pages-fixes kernel/crash_dump.c
--- 25/kernel/crash_dump.c~crashdump-routines-for-copying-dump-pages-fixes	Fri Feb  4 15:21:25 2005
+++ 25-akpm/kernel/crash_dump.c	Fri Feb  4 15:22:39 2005
@@ -28,6 +28,8 @@ ssize_t copy_oldmem_page(unsigned long p
 		return 0;
 
 	page = kmalloc(PAGE_SIZE, GFP_KERNEL);
+	if (!page)
+		return -ENOMEM;
 
 	vaddr = kmap_atomic_pfn(pfn, KM_PTE0);
 	copy_page(page, vaddr);
@@ -38,8 +40,9 @@ ssize_t copy_oldmem_page(unsigned long p
 			kfree(page);
 			return -EFAULT;
 		}
-	} else
+	} else {
 		memcpy(buf, page, csize);
+	}
 	kfree(page);
 
 	return 0;
_

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux