[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] x86/mm: set_p2m_entry() should return 0 on error
set_p2m_entry() ignores halfway errors. It should return 0 on error, shouldn't it? Signed-off-by: Kouya Shimura <kouya@xxxxxxxxxxxxxx> diff -r ba68bb0d229c xen/arch/x86/mm/p2m.c --- a/xen/arch/x86/mm/p2m.c Thu Nov 26 15:27:00 2009 +0000 +++ b/xen/arch/x86/mm/p2m.c Fri Nov 27 12:46:05 2009 +0900 @@ -1497,7 +1497,7 @@ int set_p2m_entry(struct domain *d, unsi { unsigned long todo = 1ul << page_order; unsigned int order; - int rc = 0; + int rc = 1; while ( todo ) { @@ -1506,7 +1506,8 @@ int set_p2m_entry(struct domain *d, unsi 9 : 0; else order = 0; - rc = d->arch.p2m->set_entry(d, gfn, mfn, order, p2mt); + if ( !d->arch.p2m->set_entry(d, gfn, mfn, order, p2mt) ) + rc = 0; gfn += 1ul << order; if ( mfn_x(mfn) != INVALID_MFN ) mfn = _mfn(mfn_x(mfn) + (1ul << order)); _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |