From: Sven Schnelle <svens@linux.ibm.com>
To: Gerald Schaefer <gerald.schaefer@linux.ibm.com>
Cc: linux-s390 <linux-s390@vger.kernel.org>,
Alexander Gordeev <agordeev@linux.ibm.com>
Subject: Re: [PATCH] s390/mm: Fix type mismatch in get_align_mask().
Date: Wed, 01 Jul 2026 08:25:13 +0200 [thread overview]
Message-ID: <yt9dv7az8bw6.fsf@linux.ibm.com> (raw)
In-Reply-To: <20260630173214.3114408-1-gerald.schaefer@linux.ibm.com>
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>
prev parent reply other threads:[~2026-07-01 6:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=yt9dv7az8bw6.fsf@linux.ibm.com \
--to=svens@linux.ibm.com \
--cc=agordeev@linux.ibm.com \
--cc=gerald.schaefer@linux.ibm.com \
--cc=linux-s390@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox