[Skiboot] [PATCH 2/3] VAS: use local_free to free local_alloc memory
Nicholas Piggin
npiggin at gmail.com
Sat May 13 21:31:35 AEST 2023
free() asserts because local_alloc() doesn't allocate from the skiboot
heap region. Fix this by using local_free().
Signed-off-by: Nicholas Piggin <npiggin at gmail.com>
---
hw/vas.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/vas.c b/hw/vas.c
index 96ca055c..aa3ae334 100644
--- a/hw/vas.c
+++ b/hw/vas.c
@@ -428,7 +428,7 @@ static int init_uwcm(struct proc_chip *chip)
static inline void free_wcbs(struct proc_chip *chip)
{
if (chip->vas->wcbs) {
- free((void *)chip->vas->wcbs);
+ local_free((void *)chip->vas->wcbs);
chip->vas->wcbs = 0ULL;
}
}
@@ -466,7 +466,7 @@ static int alloc_init_wcbs(struct proc_chip *chip)
return OPAL_SUCCESS;
out:
- free((void *)wcbs);
+ local_free((void *)wcbs);
return rc;
}
--
2.40.1
More information about the Skiboot
mailing list