Skip to content

Commit ec84aad

Browse files
gerald-schaeferVasily Gorbik
authored andcommitted
s390/mm: Fix type mismatch in get_align_mask().
Commit 86f48f9 ("s390/mmap: disable mmap alignment when randomize_va_space = 0") introduced get_align_mask() with return type of 'int', while the target field 'info.align_mask' in struct vm_unmapped_area_info is 'unsigned long'. With currently used masks, this should not cause truncation issues, but fix it and return 'unsigned long' to avoid future problems. Fixes: 86f48f9 ("s390/mmap: disable mmap alignment when randomize_va_space = 0") Cc: stable@vger.kernel.org # v6.9+ Signed-off-by: Gerald Schaefer <gerald.schaefer@linux.ibm.com> Reviewed-by: Sven Schnelle <svens@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
1 parent b7577fe commit ec84aad

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

arch/s390/mm/mmap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ static inline unsigned long mmap_base(unsigned long rnd,
6464
return PAGE_ALIGN(STACK_TOP - gap - rnd);
6565
}
6666

67-
static int get_align_mask(struct file *filp, unsigned long flags)
67+
static unsigned long get_align_mask(struct file *filp, unsigned long flags)
6868
{
6969
if (filp && is_file_hugepages(filp))
7070
return huge_page_mask_align(filp);

0 commit comments

Comments
 (0)