From patchwork Fri Jul 21 15:24:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helge Deller X-Patchwork-Id: 13322147 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0DD8BC001E0 for ; Fri, 21 Jul 2023 15:24:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230475AbjGUPYr (ORCPT ); Fri, 21 Jul 2023 11:24:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58438 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230344AbjGUPYn (ORCPT ); Fri, 21 Jul 2023 11:24:43 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8086D30DB; Fri, 21 Jul 2023 08:24:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1689953074; x=1690557874; i=deller@gmx.de; bh=A7WxgBjz3zo2CGF0QZzRQfzfUsKrkF2oGa6/wHukdFM=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=Ko2qdlYuXReozta8VnE/apNE4ymC4iZTiFxjjaTrWqbv3JfCPN118kMJWChmEnhlS24yB3N 1t8V9dVHuKJxQQIEvdgeGzMphReVYqX3QZ3C0WvhfnYS7SKhc+sRPYJPIDHvStB1RxMlMfEOH ZcaBANg+jJmd6S1FLrcpEWyjCN2bIl7Sa+2i4ikkkomVs4U8C7szAvfiUxuihA+dxplk7o8F0 Y0REMm9pz92bAWA+1qBDiEOTGAFQQtAqo7HwZS8KR2NL1ikeglPK9IQVkCywUGfYaP3VqPE6g vXgGkF28uQawUqqWZaqnzBFXmUajHZUGJuguXvdQ1THzu2ef6ODg== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from p100.fritz.box ([94.134.144.189]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MplXp-1pZVPD1kfV-00q8gd; Fri, 21 Jul 2023 17:24:34 +0200 From: Helge Deller To: linux-kernel@vger.kernel.org, io-uring@vger.kernel.org, Jens Axboe , linux-ia64@vger.kernel.org, Jiri Slaby , linux-parisc@vger.kernel.org Cc: Helge Deller , matoro , Andrew Morton Subject: [PATCH 2/2] ia64: mmap: Consider pgoff when searching for free mapping Date: Fri, 21 Jul 2023 17:24:32 +0200 Message-ID: <20230721152432.196382-3-deller@gmx.de> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230721152432.196382-1-deller@gmx.de> References: <20230721152432.196382-1-deller@gmx.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:BplPTINVd0OdLsIUOtIgdkny/5qsRkSo0WcblPhJqu+oYHGcw71 bySZIEIKmJcNLmjhb0oyHAQr7vH8bDvcfn3G9AiBlVHH66N8vx2stCFdAQ0FpCCx/6LRvup fNkM5mAgT11aCqfJH9ZXj7iiqcRE/77E62bTUUtTpZBy0aU9iR2eMAqkVpwUxqNvjTwas5V MOOSvn7rsNQyWiClPxdEw== UI-OutboundReport: notjunk:1;M01:P0:AYbJDJWuZLQ=;AAsXgFhQ1l5zYV5mMqehdTP+Z69 OK5Ws0ozn2VQuyZl3r6VhNTq190tOl0PsnFHiQo8EMfGxNF14Jeqq/NlM3oZsmJiWTmIiAtQM Cq4tK1VwMSsfTJGepWQgKeZqbMD98AaA30FoUvoLeyUe0APn0mykrO5eeWc3f58pcrNA/xbaA F6RN8Mn70+QFHMzOgqmNb3yzwpBNgjrGdkJm5fx6lnn1oPJUX9Uy2YJv8DqNxyvMJhGYrV4Xy fudinA+6wZ5BNMnyJuxoR+MLjfpkI1+HW76LGjPr1AC1VjmypYN0BigTDnCAr/nqbTSVaIOzV j6j4G5qmoISfY/fvPZr4tuca24UvOwBY0IrL0wRSnA+OrfOkAvkxNxjrmIpFOM63ZJi++mYuS 0MYgIeCMpkH2XvKGY+WWxlkflD6i87susUQp19Lwi4PB165Ap7MNokr63eE/n2DwiIsc0x7Ey KOx9dRGzUkRINyL/FNtUSBV/646Pb9Lql5aQa2XaY0HcVs/wcDgLwx/uMTjQjHcR3eC+sd/6R /KTmSIACgxjHYdStmASVhBa42RdXxOF6daYUCimJ5iZD4bMrtG/nTPCx/cd67JZUSr2ah+BCE wo1j9j4IQ+5nO61nhzC9aN0Pfu6WAIFqLrI4rCA4SvIpIQl3cSVlm0eLKPZ2Q95RRMepx+WX4 nW2jVZ9PIaLD3am2rpQKWd0lHxpPTlFQHy2pvwRmcBoi7K2XuH/XBONRZF7gFLnxZV0ifoA+Q 2qmv6oSRNmXrTrMhlR4j8xCn+h4HwCBwPRAZBIMc/V1WMhPWlT6CpKU4ErjOWuUs5BfNEYUZ9 ikmLLPIHkkWL55i93IKTiv9jkXTQrIq5mh19XnKVJpYNxAv71KYuJYcV312/IPpepC4CW8rsj kArwN2qAlQbBDUS9K7k+XvtCdiMv0W2nNDaizDkXthmsD1au7asBxLX/LAUxtNieo/moaxEIv SA90T0opNeszWvzo9N6wrK7IIh4= Precedence: bulk List-ID: X-Mailing-List: linux-parisc@vger.kernel.org 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. Signed-off-by: Helge Deller Tested-by: matoro Cc: Andrew Morton Cc: linux-ia64@vger.kernel.org --- arch/ia64/kernel/sys_ia64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.41.0 diff --git a/arch/ia64/kernel/sys_ia64.c b/arch/ia64/kernel/sys_ia64.c index 6e948d015332..eb561cc93632 100644 --- a/arch/ia64/kernel/sys_ia64.c +++ b/arch/ia64/kernel/sys_ia64.c @@ -63,7 +63,7 @@ arch_get_unmapped_area (struct file *filp, unsigned long addr, unsigned long len info.low_limit = addr; info.high_limit = TASK_SIZE; info.align_mask = align_mask; - info.align_offset = 0; + info.align_offset = pgoff << PAGE_SHIFT; return vm_unmapped_area(&info); }