Skip to content

Commit

Permalink
[S390] Remove error checking from copy_oldmem_page()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Michael Holzheu authored and Martin Schwidefsky committed Oct 30, 2011
1 parent 5f4026f commit 07ea815
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions arch/s390/kernel/crash_dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ ssize_t copy_oldmem_page(unsigned long pfn, char *buf,
size_t csize, unsigned long offset, int userbuf)
{
unsigned long src;
int rc;

if (!csize)
return 0;
Expand All @@ -43,11 +42,11 @@ ssize_t copy_oldmem_page(unsigned long pfn, char *buf,
src < OLDMEM_BASE + OLDMEM_SIZE)
src -= OLDMEM_BASE;
if (userbuf)
rc = copy_to_user_real((void __user *) buf, (void *) src,
csize);
copy_to_user_real((void __force __user *) buf, (void *) src,
csize);
else
rc = memcpy_real(buf, (void *) src, csize);
return rc < 0 ? rc : csize;
memcpy_real(buf, (void *) src, csize);
return csize;
}

/*
Expand Down

0 comments on commit 07ea815

Please sign in to comment.