Skip to contentSkip to conversation

Fix typo bug in ipipe_pin_range

PATCH In review Kyle Howell 3 participants 3 messages Jan 14, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix typo bug in ipipe_pin_range

Hi,

Ran across these typos in ipipe_pin_pud_range and ipipe_pin_pmd_range. On large vmas, they cause a lot of extra iteration and may cause some page table corruption.

--
Kyle Howell

=================================
This email and any files transmitted with it are confidential and intended solely for the use of the named recipient or recipients. If you have received this email in error please notify the sender immediately.

mm/memory.c +2 -2
diff -uNr linux-2.6.23.12-ipipe/mm/memory.c linux-2.6.23.12-ipipe-fix/mm/memory.c
@@ -2946,7 +2946,7 @@
 	pmd = pmd_offset(pud, addr);
 	do {
 		next = pmd_addr_end(addr, end);
-		if (ipipe_pin_pte_range(mm, pmd, vma, addr, end))
+		if (ipipe_pin_pte_range(mm, pmd, vma, addr, next))
 			return -ENOMEM;
 	} while (pmd++, addr = next, addr != end);
 	return 0;
@@ -2962,7 +2962,7 @@
 	pud = pud_offset(pgd, addr);
 	do {
 		next = pud_addr_end(addr, end);
-		if (ipipe_pin_pmd_range(mm, pud, vma, addr, end))
+		if (ipipe_pin_pmd_range(mm, pud, vma, addr, next))
 			return -ENOMEM;
 	} while (pud++, addr = next, addr != end);
 	return 0;
#1 lore raw
Quoted 5 lines · Kyle Howell

Hi,

Ran across these typos in ipipe_pin_pud_range and ipipe_pin_pmd_range. On large vmas, they cause a lot of extra iteration and may cause some page table corruption.

Oops. Will merge, thanks.

--
Philippe.

#2 lore raw
Quoted 7 lines · Philippe Gerum
Quoted 4 lines · Kyle Howell

Hi,

Ran across these typos in ipipe_pin_pud_range and ipipe_pin_pmd_range. On large vmas, they cause a lot of extra iteration and may cause some page table corruption.

Oops. Will merge, thanks.

Ah, that might explain why I saw bad entries after applying my safe-iteration patch [1]. Great!

Jan

[1] https://mail.gna.org/public/xenomai-help/2008-01/msg00051.html