Skip to content

Commit 07e9811

Browse files
hdelleraxboe
authored andcommitted
ia64: mmap: Consider pgoff when searching for free mapping
IA64 is the only architecture which does not consider the pgoff value when searching for a possible free memory region with vm_unmapped_area(). Adding this seems to have no negative side effect on IA64, so add it now to make IA64 consistent with all other architectures. Cc: stable@vger.kernel.org # 6.4 Signed-off-by: Helge Deller <deller@gmx.de> Tested-by: matoro <matoro_mailinglist_kernel@matoro.tk> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: linux-ia64@vger.kernel.org Link: https://lore.kernel.org/r/20230721152432.196382-3-deller@gmx.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 32832a4 commit 07e9811

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/ia64/kernel/sys_ia64.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ arch_get_unmapped_area (struct file *filp, unsigned long addr, unsigned long len
6363
info.low_limit = addr;
6464
info.high_limit = TASK_SIZE;
6565
info.align_mask = align_mask;
66-
info.align_offset = 0;
66+
info.align_offset = pgoff << PAGE_SHIFT;
6767
return vm_unmapped_area(&info);
6868
}
6969

0 commit comments

Comments
 (0)