From: Grazvydas Ignotas Date: Sat, 7 Feb 2015 19:22:28 +0000 (+0200) Subject: mm: allow remote_vm access to non-io pfnmap memory X-Git-Tag: sz_173~67 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=commitdiff_plain;h=9d108bea65355f33a7d1533ca60184d99750238c;hp=e2dc9d598b4945be932e176ff19b9f804c7ab1a4 mm: allow remote_vm access to non-io pfnmap memory this allows gdb to see the framebuffer and DSP shared memory --- diff --git a/mm/memory.c b/mm/memory.c index e138bf4885b5..b9a95f103d49 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -3875,7 +3875,11 @@ static int __access_remote_vm(struct task_struct *tsk, struct mm_struct *mm, vma = find_vma(mm, addr); if (!vma || vma->vm_start > addr) break; - if (vma->vm_ops && vma->vm_ops->access) + if ((vma->vm_flags & VM_PFNMAP) && + !(vma->vm_flags & VM_IO)) + ret = generic_access_phys(vma, addr, buf, + len, write); + if (ret <= 0 && vma->vm_ops && vma->vm_ops->access) ret = vma->vm_ops->access(vma, addr, buf, len, write); if (ret <= 0)