* [patch 1/2] xen/arm: Free p2m entry if fail to add it to RB tree
@ 2019-04-30 5:31 ` Hillf Danton
0 siblings, 0 replies; 3+ messages in thread
From: Hillf Danton @ 2019-04-30 5:31 UTC (permalink / raw)
To: xen-devel; +Cc: Stefano Stabellini <sstabellini@kernel.org>
[-- Attachment #1.1: Type: text/plain, Size: 580 bytes --]
Release the newly allocated p2m entry if we detect a duplicate in the RB tree.
Cc: Stefano Stabellini <sstabellini@kernel.org>
Signed-off-by: Hillf Danton <hdanton@sina.com>
---
--- a/arch/arm/xen/p2m.c 2019-04-30 12:32:05.363768200 +0800
+++ b/arch/arm/xen/p2m.c 2019-04-30 12:41:29.774041800 +0800
@@ -156,6 +156,7 @@ bool __set_phys_to_machine_multi(unsigne
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);
--
[-- Attachment #1.2: Type: text/html, Size: 2719 bytes --]
[-- Attachment #2: Type: text/plain, Size: 157 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Xen-devel] [patch 1/2] xen/arm: Free p2m entry if fail to add it to RB tree
@ 2019-04-30 5:31 ` Hillf Danton
0 siblings, 0 replies; 3+ messages in thread
From: Hillf Danton @ 2019-04-30 5:31 UTC (permalink / raw)
To: xen-devel; +Cc: Stefano Stabellini <sstabellini@kernel.org>
[-- Attachment #1.1: Type: text/plain, Size: 580 bytes --]
Release the newly allocated p2m entry if we detect a duplicate in the RB tree.
Cc: Stefano Stabellini <sstabellini@kernel.org>
Signed-off-by: Hillf Danton <hdanton@sina.com>
---
--- a/arch/arm/xen/p2m.c 2019-04-30 12:32:05.363768200 +0800
+++ b/arch/arm/xen/p2m.c 2019-04-30 12:41:29.774041800 +0800
@@ -156,6 +156,7 @@ bool __set_phys_to_machine_multi(unsigne
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);
--
[-- Attachment #1.2: Type: text/html, Size: 2719 bytes --]
[-- Attachment #2: Type: text/plain, Size: 157 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [patch 1/2] xen/arm: Free p2m entry if fail to add it to RB tree
[not found] <20190430053719.45D7621670@mail.kernel.org>
@ 2019-04-30 16:19 ` Stefano Stabellini
0 siblings, 0 replies; 3+ messages in thread
From: Stefano Stabellini @ 2019-04-30 16:19 UTC (permalink / raw)
To: Hillf Danton; +Cc: xen-devel, Stefano Stabellini <sstabellini@kernel.org>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1006 bytes --]
Hi Hillf,
Thanks for the patch. Please send emails in plain text, no html. Refer
to Documentation/process/submitting-patches.rst.
On Tue, 30 Apr 2019, Hillf Danton wrote:
> Release the newly allocated p2m entry if we detect a duplicate in the RB tree.
Space damage aside due to html, the patch looks good.
> Cc: Stefano Stabellini <sstabellini@kernel.org>
>
> Signed-off-by: Hillf Danton <hdanton@sina.com>
>
> ---
>
>
>
> --- a/arch/arm/xen/p2m.c 2019-04-30 12:32:05.363768200 +0800
>
> +++ b/arch/arm/xen/p2m.c 2019-04-30 12:41:29.774041800 +0800
>
> @@ -156,6 +156,7 @@ bool __set_phys_to_machine_multi(unsigne
>
> 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);
>
> --
>
>
>
>
>
[-- Attachment #2: Type: text/plain, Size: 157 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-04-30 16:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-30 5:31 [patch 1/2] xen/arm: Free p2m entry if fail to add it to RB tree Hillf Danton
2019-04-30 5:31 ` [Xen-devel] " Hillf Danton
[not found] <20190430053719.45D7621670@mail.kernel.org>
2019-04-30 16:19 ` Stefano Stabellini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.