From nobody Tue Aug 6 16:40:59 2024 X-Original-To: dev-commits-src-branches@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 4WdfFR1vplz5SFys; Tue, 06 Aug 2024 16:40:59 +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 4WdfFR1TnDz42N5; Tue, 6 Aug 2024 16:40:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722962459; 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=KvZ1AjuqiGxKmYlx0vMHlqlUalSuEJWdBj1Xdhq8+wU=; b=dBEn/TMnYnACmZCFedoIhjKZzJhIsJP4lW/3iTO3tYX2PUnb6V4l9KtZPMLPGqVw+/gVZ+ 0DW46tttUWVs2TJnHkubPZi3uyWewdO4ykoXfIUfSl0+faKkHyP5jukypCIE7XfsaECLP1 KJDVKgb1N1EV4ljpX0sC1SxyZqbxuP/hRBlz5/A0n5UjvyftY/73zyUyAtVWxRd7l+j1xI yCPjOSzzM6RKci7TsgcYq3JNZR4hP3o3De0T1MQjKiuUaG1XXKykDlw8/HjcZZnNa9LAOK YPrxlK4MF2EPMNF8Neh+PN+mu7XBf462sP1coKVAgjCXQb7K37TE2umamquasA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722962459; a=rsa-sha256; cv=none; b=UbuddeN68wDUm8/1tH5z+hmgNCgVGHN+Q8XIxOfXHsPenEUDPUN1H4sSsYz9RVv4MOC/Xi vlfGNEk9QlGet+w3HQM4DxPX1OI08jI+SdKeVAGnpgN49JybupgACBRpNKSwvFDmlrEr3m 4GiImNYQYireN9WdrUDK9ZW4XA2ED1UT2B96qwmRDEQAyoVC7FkyuZUSCSAjV9W4X3TbZf gCwlQDyDFXZ+hyyMyD/NKH0XenfHRgo2qEoRojlGGea7mqj0zxHVxWN4oUcgxi3WR6TITI 2qS4vbapTbU6jHtDTzY3r95024FqfB92gO/RKfS3lPmOjrnVREyvb5NzehBG2Q== 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=1722962459; 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=KvZ1AjuqiGxKmYlx0vMHlqlUalSuEJWdBj1Xdhq8+wU=; b=ymkSRwptqKm8PsIslaCrPIXoGtpq/FDbpvP+0BFX2USL40SPl1xP2t5j/t7p7Xc1RCpyO9 pBfebuVfEgOZJTEYoAlWlJAD04YLy/SUbOjJaZADhYbgL8OagWAh5Z0bEZb6tDwd1hQld+ VNRsTZLox1Hb+lBzTweLKa3QLQOuyYkBeRhqeLg4pQrN/tlgvW5gC0z+GzE/elaGrA5Au6 98Xlx5r24MdK2GLj+pJ7A+O8BUeo1hehPh8wuF+j9wKFjcpeg02ICSqB14uVx9r6NQb1K/ JZCTOI6kdebVcUShIKXhs5uYidovNwgjOJuLElSBrkmlpiDDRkRImkzGizPXUQ== 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 4WdfFR15lVzFHq; Tue, 6 Aug 2024 16:40:59 +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 476GexXX083975; Tue, 6 Aug 2024 16:40:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 476Gex60083972; Tue, 6 Aug 2024 16:40:59 GMT (envelope-from git) Date: Tue, 6 Aug 2024 16:40:59 GMT Message-Id: <202408061640.476Gex60083972@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: 067adbb4beac - stable/14 - malloc: Handle large malloc sizes in malloc_size() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 067adbb4beace0c5554926012ae1b782748bc660 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=067adbb4beace0c5554926012ae1b782748bc660 commit 067adbb4beace0c5554926012ae1b782748bc660 Author: Mark Johnston AuthorDate: 2024-07-24 20:16:20 +0000 Commit: Mark Johnston 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];