From nobody Wed Jul 24 21:24:54 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WTn9332ysz5R0mV; Wed, 24 Jul 2024 21:24:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WTn926TzKz4lJ6; Wed, 24 Jul 2024 21:24:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721856294; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5Vqmvl0J0C/6fPfxf+Zq9SlpfJAP444shOfJRaE8qPs=; b=oPAWyOWXfXskPeD8ZP0pa0+BmAL2FqpkCODZWE+mVtsl6+oTA3ITQkXT5f6pCoFY/Lm3a0 9YehygA9AvnRSIktNoOKZj4IFAUhFPkcsp91//hFPH9WQb/OKFzNRhhmNyrHdbEsGDLgzi dUrVqta4fYvkaSuXTcthO2c3Nmb5vqwe4ko4OqfGKC7meuOfXrb0SjEFFOL4BGz0WiUpQd DwirRWJ3lKG865pdGRjFuLHeENhHoB5Q/KXqrvto2/a+KZpFc/E/JlWJrdVoIti6MzvM+u ONqVKtjlHG7P7O2GTuzMHL6Q+bfYQtGUeu+S/OM0JhKZXdmnoefunqtl07+l4A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721856294; a=rsa-sha256; cv=none; b=GPSlcuPM4/zs+iYZIpsNkWQi8KUeF7mHREKeumoUlmAOtOsUj4J+XT9T7pk3jtrtBCuI2q Rvz4LgLzTaKrWnQgTy4UpXIYYpwa7OC7RZPrNNJpjT/6dlYLyI7AwXYLo4X+POSmydO9Sg IgeZdNcteBwAsQmEc4F5E+iRBMjvxuDMkdE73+x5USC2FUNe70K5RRnR68K5+6xmrh2q0S /bvJIstvtPKy2FGyFXNskyK/O30dWT8RfwKDxSMS2J13vay/gH4sDQVfajGdt6wF/pAK2A oaTBnDokdUoeBNAmIbCSuiGmSg4VKyddggloSLhjaeFqnic5IsoOhcuWXiqrjA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721856294; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5Vqmvl0J0C/6fPfxf+Zq9SlpfJAP444shOfJRaE8qPs=; b=SQwqXArho+j/boD8xmMZWsHGxsHhT4yC57OYwaC4HmY3L5FwJgyc933vkDgeH6j0yt41tq x/bwwySH5eAHC1qhsvyqFpz/sL1frwBUiNwJrYcJLVsZcok4PyC8W/MyficpTc5yHv32OV ICFhMeuh/06OOYTOZjBejrKHGdUdgFQpkre/p4uPyTKR8zxbYAoNv1CjOtsPaqU012GyCQ xeff1MWEF3893Mv8WUkNwCRKu/unEFU2PJuOC2s+MsUfTpGnGB0pNuoVtUYp80/atd0PsB 9Wqs7YoqsfnR6onZRMplm9ygLxomoM3OpnKGsY86/EitijMSBKg51xoZLTPmAQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WTn92663KzS22; Wed, 24 Jul 2024 21:24:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46OLOs4T083364; Wed, 24 Jul 2024 21:24:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46OLOsEx083361; Wed, 24 Jul 2024 21:24:54 GMT (envelope-from git) Date: Wed, 24 Jul 2024 21:24:54 GMT Message-Id: <202407242124.46OLOsEx083361@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 1c30cf95098e - main - malloc: Handle large malloc sizes in malloc_size() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1c30cf95098e999ee24b2396763b4f65d021cdf0 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=1c30cf95098e999ee24b2396763b4f65d021cdf0 commit 1c30cf95098e999ee24b2396763b4f65d021cdf0 Author: Mark Johnston AuthorDate: 2024-07-24 20:16:20 +0000 Commit: Mark Johnston CommitDate: 2024-07-24 21:24:46 +0000 malloc: Handle large malloc sizes in malloc_size() Reviewed by: kib, emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45661 --- 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 b9460515bc14..4d07581e6a5b 100644 --- a/sys/kern/kern_malloc.c +++ b/sys/kern/kern_malloc.c @@ -1130,7 +1130,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];