Skip to contentSkip to conversation

uml: Fix order of pud and pmd_free()

PATCH New Roel Kluin 1 participant 1 message Aug 22, 2009 User-mode Linux (UML)

lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

PATCH 1/1 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.

---

arch/um/kernel/skas/mmu.c +2 -2
index 0cd9a7a..8bfd1e9 100644
@@ -38,10 +38,10 @@ static int init_stub_pte(struct mm_struct *mm, unsigned long proc,
 	*pte = pte_mkread(*pte);
 	return 0;
 
- out_pmd:
-	pud_free(mm, pud);
  out_pte:
 	pmd_free(mm, pmd);
+ out_pmd:
+	pud_free(mm, pud);
  out:
 	return -ENOMEM;
 }

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel