]> www.infradead.org Git - users/jedix/linux-maple.git/commit
parisc: mm: Fix a memory leak related to pmd not attached to the pgd
authorChristophe Jaillet <christophe.jaillet@wanadoo.fr>
Mon, 13 Jul 2015 09:32:43 +0000 (11:32 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 10 Aug 2015 19:21:50 +0000 (12:21 -0700)
commit0ab58712e54f3a3258072feb15ab14bfbc42fa02
tree0eed88bc2ad78a84295a7063ac4b77435019fa82
parent78eb5efb6f79ca8fbd03cd0082e6bb22ca37fb48
parisc: mm: Fix a memory leak related to pmd not attached to the pgd

commit 4c4ac9a48ac512c6b5a6cca06cfad2ad96e8caaa upstream.

Commit 0e0da48dee8d ("parisc: mm: don't count preallocated pmds")
introduced a memory leak.

After this commit, the 'return' statement in pmd_free is executed in all
cases. Even for pmd that are not attached to the pgd.  So 'free_pages'
can never be called anymore, leading to a memory leak.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Acked-by: Mikulas Patocka <mpatocka@redhat.com>
Acked-by: Helge Deller <deller@gmx.de>
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/parisc/include/asm/pgalloc.h