projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
72813bf
)
xen/arm: Free p2m entry if fail to add it to RB tree
author
Hillf Danton
<hdanton@sina.com>
Tue, 30 Apr 2019 18:25:00 +0000
(11:25 -0700)
committer
Stefano Stabellini
<sstabellini@kernel.org>
Tue, 30 Apr 2019 18:25:00 +0000
(11:25 -0700)
Release the newly allocated p2m entry if we detect a duplicate in the RB
tree.
Signed-off-by: Hillf Danton <hdanton@sina.com>
Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
arch/arm/xen/p2m.c
patch
|
blob
|
history
diff --git
a/arch/arm/xen/p2m.c
b/arch/arm/xen/p2m.c
index
e70a49f
..
d3f632c
100644
(file)
--- a/
arch/arm/xen/p2m.c
+++ b/
arch/arm/xen/p2m.c
@@
-156,6
+156,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);