git: 067adbb4beac - stable/14 - malloc: Handle large malloc sizes in malloc_size()
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 06 Aug 2024 16:40:59 UTC
The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=067adbb4beace0c5554926012ae1b782748bc660 commit 067adbb4beace0c5554926012ae1b782748bc660 Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2024-07-24 20:16:20 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2024-08-06 16:40:51 +0000 malloc: Handle large malloc sizes in malloc_size() Reviewed by: kib, emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45661 (cherry picked from commit 1c30cf95098e999ee24b2396763b4f65d021cdf0) --- sys/kern/kern_malloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c index 6e0d12983a2b..08530b2a8930 100644 --- a/sys/kern/kern_malloc.c +++ b/sys/kern/kern_malloc.c @@ -1068,7 +1068,7 @@ malloc_size(size_t size) int indx; if (size > kmem_zmax) - return (0); + return (round_page(size)); if (size & KMEM_ZMASK) size = (size & ~KMEM_ZMASK) + KMEM_ZBASE; indx = kmemsize[size >> KMEM_ZSHIFT];