+ mm-sparse-make-sparse_init_one_section-void-and-remove-check-fix-2.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: mm/sparse.c: fix error path in sparse_add_one_section
has been added to the -mm tree.  Its filename is
     mm-sparse-make-sparse_init_one_section-void-and-remove-check-fix-2.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/mm-sparse-make-sparse_init_one_section-void-and-remove-check-fix-2.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/mm-sparse-make-sparse_init_one_section-void-and-remove-check-fix-2.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Ross Zwisler <ross.zwisler@xxxxxxxxxxxxxxx>
Subject: mm/sparse.c: fix error path in sparse_add_one_section

simplification suggested by Oscar

Link: http://lkml.kernel.org/r/20180706223358.742-1-ross.zwisler@xxxxxxxxxxxxxxx
Signed-off-by: Ross Zwisler <ross.zwisler@xxxxxxxxxxxxxxx>
Cc: Oscar Salvador <osalvador@xxxxxxx>
Cc: Michal Hocko <mhocko@xxxxxxxx>
Cc: Pavel Tatashin <pasha.tatashin@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/sparse.c |    9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff -puN mm/sparse.c~mm-sparse-make-sparse_init_one_section-void-and-remove-check-fix-2 mm/sparse.c
--- a/mm/sparse.c~mm-sparse-make-sparse_init_one_section-void-and-remove-check-fix-2
+++ a/mm/sparse.c
@@ -753,12 +753,9 @@ int __meminit sparse_add_one_section(str
 	 * plus, it does a kmalloc
 	 */
 	ret = sparse_index_init(section_nr, pgdat->node_id);
-	if (ret < 0) {
-		if (ret == -EEXIST)
-			ret = 0;
-		else
-			return ret;
-	}
+	if (ret < 0 && ret != -EEXIST)
+		return ret;
+	ret = 0;
 	memmap = kmalloc_section_memmap(section_nr, pgdat->node_id, altmap);
 	if (!memmap)
 		return -ENOMEM;
_

Patches currently in -mm which might be from ross.zwisler@xxxxxxxxxxxxxxx are

mm-sparse-make-sparse_init_one_section-void-and-remove-check-fix.patch
mm-sparse-make-sparse_init_one_section-void-and-remove-check-fix-2.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux