diff options
author | Roel Kluin <roel.kluin@gmail.com> | 2009-09-21 20:04:11 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-22 10:17:45 -0400 |
commit | 4d04c70754eec6d0fd342a5bc3f684db69cc2226 (patch) | |
tree | 4001855784fddcec748e2f9754933a537d04c7d4 /arch | |
parent | db4e5cbe2f201c6abd51f7dfe41dbd2589affeba (diff) |
uml: fix order of pud and pmd_free()
If pmd_alloc() fails we should only free the prior allocated pud, if
pte_alloc_map() fails, we should free pmd as well.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/um/kernel/skas/mmu.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/um/kernel/skas/mmu.c b/arch/um/kernel/skas/mmu.c index 0cd9a7a05e77..8bfd1e905812 100644 --- a/arch/um/kernel/skas/mmu.c +++ b/arch/um/kernel/skas/mmu.c | |||
@@ -38,10 +38,10 @@ static int init_stub_pte(struct mm_struct *mm, unsigned long proc, | |||
38 | *pte = pte_mkread(*pte); | 38 | *pte = pte_mkread(*pte); |
39 | return 0; | 39 | return 0; |
40 | 40 | ||
41 | out_pmd: | ||
42 | pud_free(mm, pud); | ||
43 | out_pte: | 41 | out_pte: |
44 | pmd_free(mm, pmd); | 42 | pmd_free(mm, pmd); |
43 | out_pmd: | ||
44 | pud_free(mm, pud); | ||
45 | out: | 45 | out: |
46 | return -ENOMEM; | 46 | return -ENOMEM; |
47 | } | 47 | } |