* [PATCH for-4.5] xen/serial: Don't leak memory mapping if the serial initialization has failed
@ 2014-02-11 21:27 Julien Grall
2014-02-19 12:21 ` Ian Campbell
0 siblings, 1 reply; 3+ messages in thread
From: Julien Grall @ 2014-02-11 21:27 UTC (permalink / raw)
To: xen-devel; +Cc: stefano.stabellini, Julien Grall, tim, ian.campbell
Signed-off-by: Julien Grall <julien.grall@linaro.org>
---
xen/drivers/char/exynos4210-uart.c | 1 +
xen/drivers/char/omap-uart.c | 1 +
xen/drivers/char/pl011.c | 1 +
xen/include/asm-arm/mm.h | 1 +
4 files changed, 4 insertions(+)
diff --git a/xen/drivers/char/exynos4210-uart.c b/xen/drivers/char/exynos4210-uart.c
index 0619575..9a2b8b9 100644
--- a/xen/drivers/char/exynos4210-uart.c
+++ b/xen/drivers/char/exynos4210-uart.c
@@ -344,6 +344,7 @@ static int __init exynos4210_uart_init(struct dt_device_node *dev,
if ( res )
{
early_printk("exynos4210: Unable to retrieve the IRQ\n");
+ iounmap(uart->regs);
return res;
}
diff --git a/xen/drivers/char/omap-uart.c b/xen/drivers/char/omap-uart.c
index c1580ef..bfc39b4 100644
--- a/xen/drivers/char/omap-uart.c
+++ b/xen/drivers/char/omap-uart.c
@@ -337,6 +337,7 @@ static int __init omap_uart_init(struct dt_device_node *dev,
if ( res )
{
early_printk("omap-uart: Unable to retrieve the IRQ\n");
+ iounmap(uart->regs);
return res;
}
diff --git a/xen/drivers/char/pl011.c b/xen/drivers/char/pl011.c
index fd82511..f7be578 100644
--- a/xen/drivers/char/pl011.c
+++ b/xen/drivers/char/pl011.c
@@ -260,6 +260,7 @@ static int __init pl011_uart_init(struct dt_device_node *dev,
if ( res )
{
early_printk("pl011: Unable to retrieve the IRQ\n");
+ iounmap(uart->regs);
return res;
}
diff --git a/xen/include/asm-arm/mm.h b/xen/include/asm-arm/mm.h
index b8d4e7d..4211c0b 100644
--- a/xen/include/asm-arm/mm.h
+++ b/xen/include/asm-arm/mm.h
@@ -4,6 +4,7 @@
#include <xen/config.h>
#include <xen/kernel.h>
#include <asm/page.h>
+#include <xen/vmap.h>
#include <public/xen.h>
/* Align Xen to a 2 MiB boundary. */
--
1.7.10.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH for-4.5] xen/serial: Don't leak memory mapping if the serial initialization has failed
2014-02-11 21:27 [PATCH for-4.5] xen/serial: Don't leak memory mapping if the serial initialization has failed Julien Grall
@ 2014-02-19 12:21 ` Ian Campbell
2014-02-19 17:46 ` Julien Grall
0 siblings, 1 reply; 3+ messages in thread
From: Ian Campbell @ 2014-02-19 12:21 UTC (permalink / raw)
To: Julien Grall; +Cc: xen-devel, tim, stefano.stabellini
On Tue, 2014-02-11 at 21:27 +0000, Julien Grall wrote:
> Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Although you could also consider moving the dt_device_get_irq before the
ioremap_attr in most cases.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH for-4.5] xen/serial: Don't leak memory mapping if the serial initialization has failed
2014-02-19 12:21 ` Ian Campbell
@ 2014-02-19 17:46 ` Julien Grall
0 siblings, 0 replies; 3+ messages in thread
From: Julien Grall @ 2014-02-19 17:46 UTC (permalink / raw)
To: Ian Campbell; +Cc: xen-devel, tim, stefano.stabellini
Hi Ian,
On 02/19/2014 12:21 PM, Ian Campbell wrote:
> On Tue, 2014-02-11 at 21:27 +0000, Julien Grall wrote:
>> Signed-off-by: Julien Grall <julien.grall@linaro.org>
>
> Acked-by: Ian Campbell <ian.campbell@citrix.com>
>
> Although you could also consider moving the dt_device_get_irq before the
> ioremap_attr in most cases.
I will use this solution.
Cheers,
--
Julien Grall
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-02-19 17:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-11 21:27 [PATCH for-4.5] xen/serial: Don't leak memory mapping if the serial initialization has failed Julien Grall
2014-02-19 12:21 ` Ian Campbell
2014-02-19 17:46 ` Julien Grall
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.