+ mm-gup-fix-memory-leak-in-__gup_benchmark_ioctl.patch added to -mm tree

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

 



The patch titled
     Subject: mm/gup: fix memory leak in __gup_benchmark_ioctl
has been added to the -mm tree.  Its filename is
     mm-gup-fix-memory-leak-in-__gup_benchmark_ioctl.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/mm-gup-fix-memory-leak-in-__gup_benchmark_ioctl.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/mm-gup-fix-memory-leak-in-__gup_benchmark_ioctl.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: Navid Emamdoost <navid.emamdoost@xxxxxxxxx>
Subject: mm/gup: fix memory leak in __gup_benchmark_ioctl

In the implementation of __gup_benchmark_ioctl() the allocated pages
should be released before returning in case of an invalid cmd.  Release
pages via kvfree().

Link: http://lkml.kernel.org/r/20191211174653.4102-1-navid.emamdoost@xxxxxxxxx
Fixes: 714a3a1ebafe ("mm/gup_benchmark.c: add additional pinning methods")
Signed-off-by: Navid Emamdoost <navid.emamdoost@xxxxxxxxx>
Cc: Keith Busch <keith.busch@xxxxxxxxx>
Cc: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx>
Cc: Dave Hansen <dave.hansen@xxxxxxxxx>
Cc: Dan Williams <dan.j.williams@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/gup_benchmark.c |    1 +
 1 file changed, 1 insertion(+)

--- a/mm/gup_benchmark.c~mm-gup-fix-memory-leak-in-__gup_benchmark_ioctl
+++ a/mm/gup_benchmark.c
@@ -63,6 +63,7 @@ static int __gup_benchmark_ioctl(unsigne
 					    NULL);
 			break;
 		default:
+			kvfree(pages);
 			return -1;
 		}
 
_

Patches currently in -mm which might be from navid.emamdoost@xxxxxxxxx are

mm-gup-fix-memory-leak-in-__gup_benchmark_ioctl.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