summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-07-19 23:46:24 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2015-07-19 23:46:24 +0300
commitff72bf7adc8e3d158d49d2b7c193f04ce2031689 (patch)
treeb2d5c19ad08cb8004785942ded9f4699d2da4ef5 /arch
parent10b97f38a9439eb911c7ec577b375674c743ca78 (diff)
parent4c4ac9a48ac512c6b5a6cca06cfad2ad96e8caaa (diff)
downloadlinux-ff72bf7adc8e3d158d49d2b7c193f04ce2031689.tar.xz
Merge branch 'parisc-4.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux
Pull parisc fix from Helge Deller: "A memory leak fix from Christophe Jaillet which was introduced with kernel 4.0 and which leads to kernel crashes on parisc after 1-3 days" * 'parisc-4.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: mm: Fix a memory leak related to pmd not attached to the pgd
Diffstat (limited to 'arch')
-rw-r--r--arch/parisc/include/asm/pgalloc.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/parisc/include/asm/pgalloc.h b/arch/parisc/include/asm/pgalloc.h
index 3a08eae3318f..3edbb9fc91b4 100644
--- a/arch/parisc/include/asm/pgalloc.h
+++ b/arch/parisc/include/asm/pgalloc.h
@@ -72,7 +72,7 @@ static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address)
static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd)
{
- if(pmd_flag(*pmd) & PxD_FLAG_ATTACHED)
+ if (pmd_flag(*pmd) & PxD_FLAG_ATTACHED) {
/*
* This is the permanent pmd attached to the pgd;
* cannot free it.
@@ -81,6 +81,7 @@ static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd)
*/
mm_inc_nr_pmds(mm);
return;
+ }
free_pages((unsigned long)pmd, PMD_ORDER);
}