lkml.org 
[lkml]   [2011]   [Apr]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Xen-devel] [PATCH REPOST] pv-grub: Fix for incorrect dom->p2m_host[] list initialization
Hello,

Daniel Kiper, le Fri 22 Apr 2011 23:25:45 +0200, a écrit :
> If pfn of newly allocated page is less than currently requested pfn
> then relevant earlier allocated mfn is overwritten which leads to
> domain crash later.

Oops, good catch! And unfortunately it happens seldomly... I guess it
may be the culprit for a fair number of other issues.

> + if (new_pfn < i)
> + for (new_pfn = i; new_pfn < dom->total_pages; ++new_pfn)
> + if (dom->p2m_host[new_pfn] == new_mfn)
> + break;

Instead of looking for the page, which takes a linear time for each page
and thus potentially quadratic time, we should probably rather record
which PFN the MFNs < allocated have been moved to?

Samuel
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2011-04-23 00:35    [W:0.066 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site