[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 07/11] x86: fold identical error paths in xenmem_add_to_physmap_one()
On 21/06/17 10:36, Jan Beulich wrote: > Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> I think this function is another one which could benefit from explicitly counting the number of references it collects, as per XSA-224. > > --- a/xen/arch/x86/mm.c > +++ b/xen/arch/x86/mm.c > @@ -4899,11 +4899,8 @@ int xenmem_add_to_physmap_one( > > if ( !paging_mode_translate(d) || (mfn == 0) ) > { > - if ( page ) > - put_page(page); > - if ( space == XENMAPSPACE_gmfn || space == XENMAPSPACE_gmfn_range ) > - put_gfn(d, gfn); > - return -EINVAL; > + rc = -EINVAL; > + goto put_both; > } > > /* Remove previously mapped page if it was present. */ > > > _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |