Aligned free for aligned alloc

Windows port frees memory that was alloc'd aligned in a different way
then alloc'd memory.  So changing frees to be specific.

Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Andrew Innes <andrew.c12@gmail.com>
Co-Authored-By: Jorgen Lundman <lundman@lundman.net>
Closes #14059
This commit is contained in:
Andrew Innes
2022-10-27 06:08:31 +08:00
committed by GitHub
parent 41133c9794
commit 07de86923b
3 changed files with 30 additions and 12 deletions
+2 -2
View File
@@ -598,7 +598,7 @@ abd_free_chunks(abd_t *abd)
abd_for_each_sg(abd, sg, n, i) {
struct page *p = nth_page(sg_page(sg), 0);
umem_free(p, PAGESIZE);
umem_free_aligned(p, PAGESIZE);
}
abd_free_sg_table(abd);
}
@@ -704,7 +704,7 @@ abd_free_zero_scatter(void)
__free_page(abd_zero_page);
#endif /* HAVE_ZERO_PAGE_GPL_ONLY */
#else
umem_free(abd_zero_page, PAGESIZE);
umem_free_aligned(abd_zero_page, PAGESIZE);
#endif /* _KERNEL */
}