+ mm-gup-finish-consolidating-error-handling.patch added to -mm tree

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

 



The patch titled
     Subject: mm/gup: finish consolidating error handling
has been added to the -mm tree.  Its filename is
     mm-gup-finish-consolidating-error-handling.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/mm-gup-finish-consolidating-error-handling.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/mm-gup-finish-consolidating-error-handling.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: John Hubbard <jhubbard@xxxxxxxxxx>
Subject: mm/gup: finish consolidating error handling

df06b37ffe5a4 ("mm/gup: cache dev_pagemap while pinning pages") attempted
to operate on each page that get_user_pages had retrieved.  In order to do
that, it created a common exit point from the routine.  However, one case
was missed, which this patch fixes up.

Also, there was still an unnecessary shadow declaration (with a different
type) of the "ret" variable, which this patch removes.

Link: http://lkml.kernel.org/r/20181121081402.29641-2-jhubbard@xxxxxxxxxx
Fixes: df06b37ffe5a4 ("mm/gup: cache dev_pagemap while pinning pages")
Signed-off-by: John Hubbard <jhubbard@xxxxxxxxxx>
Reviewed-by: Keith Busch <keith.busch@xxxxxxxxx>
Cc: Dan Williams <dan.j.williams@xxxxxxxxx>
Cc: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx>
Cc: Dave Hansen <dave.hansen@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---


--- a/mm/gup.c~mm-gup-finish-consolidating-error-handling
+++ a/mm/gup.c
@@ -702,12 +702,11 @@ static long __get_user_pages(struct task
 		if (!vma || start >= vma->vm_end) {
 			vma = find_extend_vma(mm, start);
 			if (!vma && in_gate_area(mm, start)) {
-				int ret;
 				ret = get_gate_page(mm, start & PAGE_MASK,
 						gup_flags, &vma,
 						pages ? &pages[i] : NULL);
 				if (ret)
-					return i ? : ret;
+					goto out;
 				ctx.page_mask = 0;
 				goto next_page;
 			}
_

Patches currently in -mm which might be from jhubbard@xxxxxxxxxx are

mm-gup-finish-consolidating-error-handling.patch




[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