mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2026-01-27 12:47:24 +01:00
cramfs: fix incorrect physical page address calculation
[ Upstream commit20a8e0454d] Commit21aa65bf82("mm: remove callers of pfn_t functionality") incorrectly replaced the pfn with the physical address when calling vmf_insert_mixed(). Instead the phys_to_pfn_t() call should have been replaced with PHYS_PFN(). Found by inspection after a similar issue was noted in fuse virtio_fs. Link: https://lkml.kernel.org/r/20250923005333.3165032-1-apopple@nvidia.com Fixes:21aa65bf82("mm: remove callers of pfn_t functionality") Signed-off-by: Alistair Popple <apopple@nvidia.com> Reviewed-by: Dev Jain <dev.jain@arm.com> Reviewed-by: David Hildenbrand <david@redhat.com> Cc: Haiyue Wang <haiyuewa@163.com> Cc: Nicolas Pitre <nico@fluxnic.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
55a70e1de7
commit
64dfd595d3
|
|
@ -412,7 +412,7 @@ static int cramfs_physmem_mmap(struct file *file, struct vm_area_struct *vma)
|
|||
vm_fault_t vmf;
|
||||
unsigned long off = i * PAGE_SIZE;
|
||||
vmf = vmf_insert_mixed(vma, vma->vm_start + off,
|
||||
address + off);
|
||||
PHYS_PFN(address + off));
|
||||
if (vmf & VM_FAULT_ERROR)
|
||||
ret = vm_fault_to_errno(vmf, 0);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user