* [PATCH] s390/mm: Fix type mismatch in get_align_mask().
@ 2026-06-30 17:32 Gerald Schaefer
2026-07-01 6:25 ` Sven Schnelle
0 siblings, 1 reply; 2+ messages in thread
From: Gerald Schaefer @ 2026-06-30 17:32 UTC (permalink / raw)
To: linux-s390; +Cc: Sven Schnelle, Alexander Gordeev
Commit 86f48f922ba79 ("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: 86f48f922ba79 ("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>
---
arch/s390/mm/mmap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/s390/mm/mmap.c b/arch/s390/mm/mmap.c
index 2a222a7e14f4..ef7bfc87758c 100644
--- a/arch/s390/mm/mmap.c
+++ b/arch/s390/mm/mmap.c
@@ -64,7 +64,7 @@ static inline unsigned long mmap_base(unsigned long rnd,
return PAGE_ALIGN(STACK_TOP - gap - rnd);
}
-static int get_align_mask(struct file *filp, unsigned long flags)
+static unsigned long get_align_mask(struct file *filp, unsigned long flags)
{
if (filp && is_file_hugepages(filp))
return huge_page_mask_align(filp);
base-commit: dc59e4fea9d83f03bad6bddf3fa2e52491777482
--
2.53.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] s390/mm: Fix type mismatch in get_align_mask().
2026-06-30 17:32 [PATCH] s390/mm: Fix type mismatch in get_align_mask() Gerald Schaefer
@ 2026-07-01 6:25 ` Sven Schnelle
0 siblings, 0 replies; 2+ messages in thread
From: Sven Schnelle @ 2026-07-01 6:25 UTC (permalink / raw)
To: Gerald Schaefer; +Cc: linux-s390, Alexander Gordeev
Gerald Schaefer <gerald.schaefer@linux.ibm.com> writes:
> Commit 86f48f922ba79 ("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: 86f48f922ba79 ("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>
> ---
> arch/s390/mm/mmap.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/s390/mm/mmap.c b/arch/s390/mm/mmap.c
> index 2a222a7e14f4..ef7bfc87758c 100644
> --- a/arch/s390/mm/mmap.c
> +++ b/arch/s390/mm/mmap.c
> @@ -64,7 +64,7 @@ static inline unsigned long mmap_base(unsigned long rnd,
> return PAGE_ALIGN(STACK_TOP - gap - rnd);
> }
>
> -static int get_align_mask(struct file *filp, unsigned long flags)
> +static unsigned long get_align_mask(struct file *filp, unsigned long flags)
> {
> if (filp && is_file_hugepages(filp))
> return huge_page_mask_align(filp);
>
> base-commit: dc59e4fea9d83f03bad6bddf3fa2e52491777482
Reviewed-by: Sven Schnelle <svens@linux.ibm.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-07-01 6:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-30 17:32 [PATCH] s390/mm: Fix type mismatch in get_align_mask() Gerald Schaefer
2026-07-01 6:25 ` Sven Schnelle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox