* [PATCH] common: memory: fix off-by-one in tlsf_create
@ 2012-04-24 9:23 Marc Kleine-Budde
2012-04-24 13:19 ` Sascha Hauer
0 siblings, 1 reply; 2+ messages in thread
From: Marc Kleine-Budde @ 2012-04-24 9:23 UTC (permalink / raw)
To: barebox
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
common/memory.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/common/memory.c b/common/memory.c
index faff33b..3b4a5ef 100644
--- a/common/memory.c
+++ b/common/memory.c
@@ -58,7 +58,7 @@ void mem_malloc_init(void *start, void *end)
malloc_end = (unsigned long)end;
malloc_brk = malloc_start;
#ifdef CONFIG_MALLOC_TLSF
- tlsf_mem_pool = tlsf_create(start, (char *)end - (char *)start);
+ tlsf_mem_pool = tlsf_create(start, end - start + 1);
#endif
}
--
1.7.4.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] common: memory: fix off-by-one in tlsf_create
2012-04-24 9:23 [PATCH] common: memory: fix off-by-one in tlsf_create Marc Kleine-Budde
@ 2012-04-24 13:19 ` Sascha Hauer
0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2012-04-24 13:19 UTC (permalink / raw)
To: Marc Kleine-Budde; +Cc: barebox
On Tue, Apr 24, 2012 at 11:23:03AM +0200, Marc Kleine-Budde wrote:
> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Applied, thanks.
Sascha
> ---
> common/memory.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/common/memory.c b/common/memory.c
> index faff33b..3b4a5ef 100644
> --- a/common/memory.c
> +++ b/common/memory.c
> @@ -58,7 +58,7 @@ void mem_malloc_init(void *start, void *end)
> malloc_end = (unsigned long)end;
> malloc_brk = malloc_start;
> #ifdef CONFIG_MALLOC_TLSF
> - tlsf_mem_pool = tlsf_create(start, (char *)end - (char *)start);
> + tlsf_mem_pool = tlsf_create(start, end - start + 1);
> #endif
> }
>
> --
> 1.7.4.1
>
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-04-24 13:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-24 9:23 [PATCH] common: memory: fix off-by-one in tlsf_create Marc Kleine-Budde
2012-04-24 13:19 ` Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox