diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-05-16 04:44:52 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-05-16 04:44:52 +0300 |
commit | 5fd09ba68297c967f5ba6bea9c3b444d34f80ee5 (patch) | |
tree | 1d722fb2cde0178da2a26afc0ef8b93bec69ad2e /arch/arm | |
parent | 8a635ffb142125c6637fe71d5cbce25e7dfa275e (diff) | |
parent | fe846979d30576107aa9910e1820fec3c20e62d7 (diff) | |
download | linux-5fd09ba68297c967f5ba6bea9c3b444d34f80ee5.tar.xz |
Merge tag 'for-linus-5.2b-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip
Pull xen updates from Juergen Gross:
- some minor cleanups
- two small corrections for Xen on ARM
- two fixes for Xen PVH guest support
- a patch for a new command line option to tune virtual timer handling
* tag 'for-linus-5.2b-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
xen/arm: Use p2m entry with lock protection
xen/arm: Free p2m entry if fail to add it to RB tree
xen/pvh: correctly setup the PV EFI interface for dom0
xen/pvh: set xen_domain_type to HVM in xen_pvh_init
xenbus: drop useless LIST_HEAD in xenbus_write_watch() and xenbus_file_write()
xen-netfront: mark expected switch fall-through
xen: xen-pciback: fix warning Using plain integer as NULL pointer
x86/xen: Add "xen_timer_slop" command line option
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/xen/p2m.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/arm/xen/p2m.c b/arch/arm/xen/p2m.c index e70a49fc8dcd..da2a7044a124 100644 --- a/arch/arm/xen/p2m.c +++ b/arch/arm/xen/p2m.c @@ -70,8 +70,9 @@ unsigned long __pfn_to_mfn(unsigned long pfn) entry = rb_entry(n, struct xen_p2m_entry, rbnode_phys); if (entry->pfn <= pfn && entry->pfn + entry->nr_pages > pfn) { + unsigned long mfn = entry->mfn + (pfn - entry->pfn); read_unlock_irqrestore(&p2m_lock, irqflags); - return entry->mfn + (pfn - entry->pfn); + return mfn; } if (pfn < entry->pfn) n = n->rb_left; @@ -156,6 +157,7 @@ bool __set_phys_to_machine_multi(unsigned long pfn, rc = xen_add_phys_to_mach_entry(p2m_entry); if (rc < 0) { write_unlock_irqrestore(&p2m_lock, irqflags); + kfree(p2m_entry); return false; } write_unlock_irqrestore(&p2m_lock, irqflags); |