From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 2838C13933E for ; Mon, 5 Jul 2021 14:11:33 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5FDDEE09E9; Mon, 5 Jul 2021 14:11:32 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3E1F5E09E9 for ; Mon, 5 Jul 2021 14:11:32 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 331C0342A87 for ; Mon, 5 Jul 2021 14:11:30 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id B637B7BC for ; Mon, 5 Jul 2021 14:11:28 +0000 (UTC) From: "Mike Pagano" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Pagano" Message-ID: <1625494217.6ac83a2778d17a95e61f53637085d2c776a2f728.mpagano@gentoo> Subject: [gentoo-commits] proj/linux-patches:5.13 commit in: / X-VCS-Repository: proj/linux-patches X-VCS-Files: 0000_README 1800_mm-page-alloc-fix-ret-val-on-alloc-fail.patch X-VCS-Directories: / X-VCS-Committer: mpagano X-VCS-Committer-Name: Mike Pagano X-VCS-Revision: 6ac83a2778d17a95e61f53637085d2c776a2f728 X-VCS-Branch: 5.13 Date: Mon, 5 Jul 2021 14:11:28 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 464640f3-688e-4eea-acf7-08be89d05f8c X-Archives-Hash: 3b1dcbd918770a1cb0c3dee0996c6269 commit: 6ac83a2778d17a95e61f53637085d2c776a2f728 Author: Mike Pagano gentoo org> AuthorDate: Mon Jul 5 14:10:17 2021 +0000 Commit: Mike Pagano gentoo org> CommitDate: Mon Jul 5 14:10:17 2021 +0000 URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=6ac83a27 mm/page_alloc: correct retval of pop elemnts if bulk arr is populated Signed-off-by: Mike Pagano gentoo.org> 0000_README | 4 ++ 1800_mm-page-alloc-fix-ret-val-on-alloc-fail.patch | 50 ++++++++++++++++++++++ 2 files changed, 54 insertions(+) diff --git a/0000_README b/0000_README index 2bffadc..0f74eb1 100644 --- a/0000_README +++ b/0000_README @@ -55,6 +55,10 @@ Patch: 2000_BT-Check-key-sizes-only-if-Secure-Simple-Pairing-enabled.patch From: https://lore.kernel.org/linux-bluetooth/20190522070540.48895-1-marcel@holtmann.org/raw Desc: Bluetooth: Check key sizes only when Secure Simple Pairing is enabled. See bug #686758 +Patch: 1800_mm-page-alloc-fix-ret-val-on-alloc-fail.patch +From: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/patch/?id=ff4b2b4014cbffb3d32b22629252f4dc8616b0fe +Desc: mm/page_alloc: correct return value of populated elements if bulk array is populated + Patch: 2900_tmp513-Fix-build-issue-by-selecting-CONFIG_REG.patch From: https://bugs.gentoo.org/710790 Desc: tmp513 requies REGMAP_I2C to build. Select it by default in Kconfig. See bug #710790. Thanks to Phil Stracchino diff --git a/1800_mm-page-alloc-fix-ret-val-on-alloc-fail.patch b/1800_mm-page-alloc-fix-ret-val-on-alloc-fail.patch new file mode 100644 index 0000000..2f1b4dc --- /dev/null +++ b/1800_mm-page-alloc-fix-ret-val-on-alloc-fail.patch @@ -0,0 +1,50 @@ +From ff4b2b4014cbffb3d32b22629252f4dc8616b0fe Mon Sep 17 00:00:00 2001 +From: Mel Gorman +Date: Mon, 28 Jun 2021 19:33:29 -0700 +Subject: mm/page_alloc: correct return value of populated elements if bulk + array is populated + +Dave Jones reported the following + + This made it into 5.13 final, and completely breaks NFSD for me + (Serving tcp v3 mounts). Existing mounts on clients hang, as do + new mounts from new clients. Rebooting the server back to rc7 + everything recovers. + +The commit b3b64ebd3822 ("mm/page_alloc: do bulk array bounds check after +checking populated elements") returns the wrong value if the array is +already populated which is interpreted as an allocation failure. Dave +reported this fixes his problem and it also passed a test running dbench +over NFS. + +Link: https://lkml.kernel.org/r/20210628150219.GC3840@techsingularity.net +Fixes: b3b64ebd3822 ("mm/page_alloc: do bulk array bounds check after checking populated elements") +Signed-off-by: Mel Gorman +Reported-by: Dave Jones +Tested-by: Dave Jones +Cc: Dan Carpenter +Cc: Jesper Dangaard Brouer +Cc: Vlastimil Babka +Cc: [5.13+] +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +--- + mm/page_alloc.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/mm/page_alloc.c b/mm/page_alloc.c +index 5b5c9f5813b9a..2bf03c76504b0 100644 +--- a/mm/page_alloc.c ++++ b/mm/page_alloc.c +@@ -5058,7 +5058,7 @@ unsigned long __alloc_pages_bulk(gfp_t gfp, int preferred_nid, + + /* Already populated array? */ + if (unlikely(page_array && nr_pages - nr_populated == 0)) +- return 0; ++ return nr_populated; + + /* Use the single page allocator for one page. */ + if (nr_pages - nr_populated == 1) +-- +cgit 1.2.3-1.el7 +