Gentoo Archives: gentoo-commits

From: Mike Pagano <mpagano@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/linux-patches:5.13 commit in: /
Date: Mon, 05 Jul 2021 14:11:33
Message-Id: 1625494217.6ac83a2778d17a95e61f53637085d2c776a2f728.mpagano@gentoo
1 commit: 6ac83a2778d17a95e61f53637085d2c776a2f728
2 Author: Mike Pagano <mpagano <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jul 5 14:10:17 2021 +0000
4 Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org>
5 CommitDate: Mon Jul 5 14:10:17 2021 +0000
6 URL: https://gitweb.gentoo.org/proj/linux-patches.git/commit/?id=6ac83a27
7
8 mm/page_alloc: correct retval of pop elemnts if bulk arr is populated
9
10 Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org>
11
12 0000_README | 4 ++
13 1800_mm-page-alloc-fix-ret-val-on-alloc-fail.patch | 50 ++++++++++++++++++++++
14 2 files changed, 54 insertions(+)
15
16 diff --git a/0000_README b/0000_README
17 index 2bffadc..0f74eb1 100644
18 --- a/0000_README
19 +++ b/0000_README
20 @@ -55,6 +55,10 @@ Patch: 2000_BT-Check-key-sizes-only-if-Secure-Simple-Pairing-enabled.patch
21 From: https://lore.kernel.org/linux-bluetooth/20190522070540.48895-1-marcel@××××××××.org/raw
22 Desc: Bluetooth: Check key sizes only when Secure Simple Pairing is enabled. See bug #686758
23
24 +Patch: 1800_mm-page-alloc-fix-ret-val-on-alloc-fail.patch
25 +From: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/patch/?id=ff4b2b4014cbffb3d32b22629252f4dc8616b0fe
26 +Desc: mm/page_alloc: correct return value of populated elements if bulk array is populated
27 +
28 Patch: 2900_tmp513-Fix-build-issue-by-selecting-CONFIG_REG.patch
29 From: https://bugs.gentoo.org/710790
30 Desc: tmp513 requies REGMAP_I2C to build. Select it by default in Kconfig. See bug #710790. Thanks to Phil Stracchino
31
32 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
33 new file mode 100644
34 index 0000000..2f1b4dc
35 --- /dev/null
36 +++ b/1800_mm-page-alloc-fix-ret-val-on-alloc-fail.patch
37 @@ -0,0 +1,50 @@
38 +From ff4b2b4014cbffb3d32b22629252f4dc8616b0fe Mon Sep 17 00:00:00 2001
39 +From: Mel Gorman <mgorman@×××××××××××××××.net>
40 +Date: Mon, 28 Jun 2021 19:33:29 -0700
41 +Subject: mm/page_alloc: correct return value of populated elements if bulk
42 + array is populated
43 +
44 +Dave Jones reported the following
45 +
46 + This made it into 5.13 final, and completely breaks NFSD for me
47 + (Serving tcp v3 mounts). Existing mounts on clients hang, as do
48 + new mounts from new clients. Rebooting the server back to rc7
49 + everything recovers.
50 +
51 +The commit b3b64ebd3822 ("mm/page_alloc: do bulk array bounds check after
52 +checking populated elements") returns the wrong value if the array is
53 +already populated which is interpreted as an allocation failure. Dave
54 +reported this fixes his problem and it also passed a test running dbench
55 +over NFS.
56 +
57 +Link: https://lkml.kernel.org/r/20210628150219.GC3840@×××××××××××××××.net
58 +Fixes: b3b64ebd3822 ("mm/page_alloc: do bulk array bounds check after checking populated elements")
59 +Signed-off-by: Mel Gorman <mgorman@×××××××××××××××.net>
60 +Reported-by: Dave Jones <davej@××××××××××××××.uk>
61 +Tested-by: Dave Jones <davej@××××××××××××××.uk>
62 +Cc: Dan Carpenter <dan.carpenter@××××××.com>
63 +Cc: Jesper Dangaard Brouer <brouer@××××××.com>
64 +Cc: Vlastimil Babka <vbabka@××××.cz>
65 +Cc: <stable@×××××××××××.org> [5.13+]
66 +Signed-off-by: Andrew Morton <akpm@××××××××××××××××.org>
67 +Signed-off-by: Linus Torvalds <torvalds@××××××××××××××××.org>
68 +---
69 + mm/page_alloc.c | 2 +-
70 + 1 file changed, 1 insertion(+), 1 deletion(-)
71 +
72 +diff --git a/mm/page_alloc.c b/mm/page_alloc.c
73 +index 5b5c9f5813b9a..2bf03c76504b0 100644
74 +--- a/mm/page_alloc.c
75 ++++ b/mm/page_alloc.c
76 +@@ -5058,7 +5058,7 @@ unsigned long __alloc_pages_bulk(gfp_t gfp, int preferred_nid,
77 +
78 + /* Already populated array? */
79 + if (unlikely(page_array && nr_pages - nr_populated == 0))
80 +- return 0;
81 ++ return nr_populated;
82 +
83 + /* Use the single page allocator for one page. */
84 + if (nr_pages - nr_populated == 1)
85 +--
86 +cgit 1.2.3-1.el7
87 +