Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke...
[sfrench/cifs-2.6.git] / arch / powerpc / kernel / crash_dump.c
index 40f524643ba6f76ed7aa3065ebc053e96f1ad27f..8e05c16344e4d82e85ced2c98cedf9e4d1bb21f7 100644 (file)
@@ -128,9 +128,9 @@ ssize_t copy_oldmem_page(unsigned long pfn, char *buf,
        if (!csize)
                return 0;
 
-       csize = min(csize, PAGE_SIZE);
+       csize = min_t(size_t, csize, PAGE_SIZE);
 
-       if (pfn < max_pfn) {
+       if ((min_low_pfn < pfn) && (pfn < max_pfn)) {
                vaddr = __va(pfn << PAGE_SHIFT);
                csize = copy_oldmem_vaddr(vaddr, buf, csize, offset, userbuf);
        } else {