All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-core] [PATCH] Fix typo bug in ipipe_pin_range
@ 2008-01-14 20:42 Kyle Howell
  2008-01-14 20:47 ` Philippe Gerum
  0 siblings, 1 reply; 3+ messages in thread
From: Kyle Howell @ 2008-01-14 20:42 UTC (permalink / raw)
  To: xenomai


[-- Attachment #1.1: Type: text/plain, Size: 449 bytes --]


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.  

[-- Attachment #1.2: Type: text/html, Size: 870 bytes --]

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: pin_fix.patch --]
[-- Type: text/x-patch; name="pin_fix.patch", Size: 792 bytes --]

diff -uNr linux-2.6.23.12-ipipe/mm/memory.c linux-2.6.23.12-ipipe-fix/mm/memory.c
--- linux-2.6.23.12-ipipe/mm/memory.c	2008-01-14 15:00:59.000000000 -0500
+++ linux-2.6.23.12-ipipe-fix/mm/memory.c	2008-01-14 15:10:02.000000000 -0500
@@ -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;

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Xenomai-core] [PATCH] Fix typo bug in ipipe_pin_range
  2008-01-14 20:42 [Xenomai-core] [PATCH] Fix typo bug in ipipe_pin_range Kyle Howell
@ 2008-01-14 20:47 ` Philippe Gerum
  2008-01-14 20:56   ` Jan Kiszka
  0 siblings, 1 reply; 3+ messages in thread
From: Philippe Gerum @ 2008-01-14 20:47 UTC (permalink / raw)
  To: Kyle Howell; +Cc: xenomai

Kyle Howell wrote:
> 
> 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.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Xenomai-core] [PATCH] Fix typo bug in ipipe_pin_range
  2008-01-14 20:47 ` Philippe Gerum
@ 2008-01-14 20:56   ` Jan Kiszka
  0 siblings, 0 replies; 3+ messages in thread
From: Jan Kiszka @ 2008-01-14 20:56 UTC (permalink / raw)
  To: rpm; +Cc: xenomai

[-- Attachment #1: Type: text/plain, Size: 452 bytes --]

Philippe Gerum wrote:
> Kyle Howell wrote:
>> 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


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-01-14 20:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-14 20:42 [Xenomai-core] [PATCH] Fix typo bug in ipipe_pin_range Kyle Howell
2008-01-14 20:47 ` Philippe Gerum
2008-01-14 20:56   ` Jan Kiszka

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.