aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Holzheu <holzheu@linux.vnet.ibm.com>2011-10-30 10:17:21 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2011-10-30 10:16:47 -0400
commit07ea815b22b9f70ec8de6ddf8db63a1dd1585caf (patch)
treee30015ef66661f3bb112136d42ea2dee86393d81
parent5f4026f8b2e4c5e26713d6c707592a33326a88c4 (diff)
[S390] Remove error checking from copy_oldmem_page()
Currently it can happen that the pre-allocated ELF header contains a wrong memory map which would result in errors when copying /proc/vmcore. In order to still get a valid vmcore, we (temporarily) disable the error checking in copy_oldmem_page(). This will then produce zero pages for those memory regions. Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
-rw-r--r--arch/s390/kernel/crash_dump.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/arch/s390/kernel/crash_dump.c b/arch/s390/kernel/crash_dump.c
index 2a9a3f405574..39f8fd4438fc 100644
--- a/arch/s390/kernel/crash_dump.c
+++ b/arch/s390/kernel/crash_dump.c
@@ -31,7 +31,6 @@ ssize_t copy_oldmem_page(unsigned long pfn, char *buf,
31 size_t csize, unsigned long offset, int userbuf) 31 size_t csize, unsigned long offset, int userbuf)
32{ 32{
33 unsigned long src; 33 unsigned long src;
34 int rc;
35 34
36 if (!csize) 35 if (!csize)
37 return 0; 36 return 0;
@@ -43,11 +42,11 @@ ssize_t copy_oldmem_page(unsigned long pfn, char *buf,
43 src < OLDMEM_BASE + OLDMEM_SIZE) 42 src < OLDMEM_BASE + OLDMEM_SIZE)
44 src -= OLDMEM_BASE; 43 src -= OLDMEM_BASE;
45 if (userbuf) 44 if (userbuf)
46 rc = copy_to_user_real((void __user *) buf, (void *) src, 45 copy_to_user_real((void __force __user *) buf, (void *) src,
47 csize); 46 csize);
48 else 47 else
49 rc = memcpy_real(buf, (void *) src, csize); 48 memcpy_real(buf, (void *) src, csize);
50 return rc < 0 ? rc : csize; 49 return csize;
51} 50}
52 51
53/* 52/*