Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 07ea815b authored by Michael Holzheu's avatar Michael Holzheu Committed by Martin Schwidefsky
Browse files

[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: default avatarMichael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 5f4026f8
Loading
Loading
Loading
Loading
+4 −5
Original line number Original line Diff line number Diff line
@@ -31,7 +31,6 @@ ssize_t copy_oldmem_page(unsigned long pfn, char *buf,
			 size_t csize, unsigned long offset, int userbuf)
			 size_t csize, unsigned long offset, int userbuf)
{
{
	unsigned long src;
	unsigned long src;
	int rc;


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


/*
/*