Skip to content
Commit 4c4ac9a4 authored by Christophe Jaillet's avatar Christophe Jaillet Committed by Helge Deller
Browse files

parisc: mm: Fix a memory leak related to pmd not attached to the pgd

Commit 0e0da48d

 ("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: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: default avatarKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Acked-by: default avatarMikulas Patocka <mpatocka@redhat.com>
Acked-by: default avatarHelge Deller <deller@gmx.de>
Cc: stable@vger.kernel.org  # v4.0+
Signed-off-by: default avatarHelge Deller <deller@gmx.de>
parent 9d37e667
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment