From nobody Tue Jul 21 18:57:41 2026 X-Original-To: dev-commits-src-main@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 4h4RTt6qWtz6mKfs for ; Tue, 21 Jul 2026 18:57:54 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: from mail-yw1-f174.google.com (mail-yw1-f174.google.com [209.85.128.174]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4h4RTt4dHfz3F0r for ; Tue, 21 Jul 2026 18:57:54 +0000 (UTC) (envelope-from rlibby@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-yw1-f174.google.com with SMTP id 00721157ae682-81ed000b507so62699817b3.0 for ; Tue, 21 Jul 2026 11:57:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784660273; x=1785265073; h=content-transfer-encoding:content-type:cc:to:subject:message-id :date:from:in-reply-to:references:mime-version:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=ck81AL4dO6dRHLfMkN9La6aRDaezd+FN7ulI7n0Bzwg=; b=LRvk7sJfFgZ/hcPPEgk47r0js6a4K/BrZxkBfyTXkusYhM3CYlNaKR20Bn3VrFiTmt Qg+qrEYUVJPHB7anOTF5BtqWi83dQPVo5myWSIVjvI4uTH9giNUeMUGpFTQclkmQRAlj 8EcoyqA5YryhKrZdh2bYxcT/VZHAE9SIB8JD0Q5EMqMJxjx26Xd6+YXtoJi6ORVaSw06 k/cBAHEoZ+Vg5jFYgRmEiVNfyggkgkfaFKvFEryJeECyQN5m2Tp1O/iyY57IHbmnq4Pu +4Oh7N/cS4vx8piqO3wKatWUj2Xswpv1p6t7IfwLEOtGNcEu1e9J62joihinQPGBEGaI r6yA== X-Forwarded-Encrypted: i=1; AHgh+RoX96oivqBDLlHiiorBFQrGytfuBmGrTvFy0ALxHTz/HkBHWVe3zqf9MImEdMc+iTEVnZAGgyO9MPxax5p+3hRHDX8VGQ==@freebsd.org X-Gm-Message-State: AOJu0YwwUiZ2JGd+8buFdk5+h07S87MxBtjMRFmB8nYPxrGm/QKxu9Ho PtKIbfP7/PnpBDFD5qRVN4CFE2ebCOveKs5JRctIa5bZ9qIjnP76SQnQmjGthw== X-Gm-Gg: AR+sD137dNlSyGTIElzIkaaBdy9nFsOcNsuCSpvkgkfeKHPZCwZhLWjRG5N4HL/530t aiYdwGU7o01raKPTtxOZfoxfJweNybHPfn7+mHrLYcWELlL9Of7VTGXxekLW9c5yynELiRO+OYp +fH9PhRHAw5GptmCeispBtRI4vCKNxpdRJpvt5IxZJB2FsGwXB0x65MF5vKsbts7IumV9MOXA0B If9Z48PrRAzooo0coKnvKcuJJQuautbbohRQeRYSAx+Gsmocg9OGb996uIJIjatEGasmDW2BH9y IhEqlChmJvtRiPD3B5IXeX7z8nWcujQnNhnppL9BpbS8g2+pDziOrsQIBdkqkogkHRz75dOktwv GRMu5Vt5Ik7+y3D1auqzl1d7Gqi145YAEqq1ZT//7SqGi9Zh63AumcdEiDB9x3g7dL3WLJPjsJM yA0NA1E7lqr1TCGlPnoBn3GmUe8xJhF0LhesrCRsrN X-Received: by 2002:a05:690c:62c4:b0:80d:21d3:a399 with SMTP id 00721157ae682-81ef25ffae6mr62803447b3.48.1784660273551; Tue, 21 Jul 2026 11:57:53 -0700 (PDT) Received: from mail-yw1-f177.google.com (mail-yw1-f177.google.com. [209.85.128.177]) by smtp.gmail.com with ESMTPSA id 00721157ae682-81f33bf2d8bsm2370407b3.1.2026.07.21.11.57.52 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 21 Jul 2026 11:57:52 -0700 (PDT) Received: by mail-yw1-f177.google.com with SMTP id 00721157ae682-7dbcb505578so80086717b3.3 for ; Tue, 21 Jul 2026 11:57:52 -0700 (PDT) X-Forwarded-Encrypted: i=1; AHgh+RrRUI/DmptOkFJ8bTMk8k3gjfscc1E+vOU+C8RAfFb5XJ4nbi5XK6nx0aUR2tzgS3OlJyrx8bdJ2R+hY00HC/CQiNFzFA==@freebsd.org X-Received: by 2002:a05:690c:3387:b0:81d:4f4b:94be with SMTP id 00721157ae682-81ef251c90emr57865307b3.32.1784660272626; Tue, 21 Jul 2026 11:57:52 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 References: <6a5fba36.3d93d.694b6c5c@gitrepo.freebsd.org> In-Reply-To: <6a5fba36.3d93d.694b6c5c@gitrepo.freebsd.org> From: Ryan Libby Date: Tue, 21 Jul 2026 11:57:41 -0700 X-Gmail-Original-Message-ID: X-Gm-Features: AUfX_myoSsydytRgXG7XUSUTRQuAJUuwtXKsA0oU42ACqWL5R6VOw1Lof5wiij8 Message-ID: Subject: Re: git: caabdb3aefdc - main - contigmalloc.9: Note that M_WAITOK may still return NULL To: Ed Maste , Mark Johnston Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4h4RTt4dHfz3F0r X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Spamd-Bar: ---- On Tue, Jul 21, 2026 at 11:28=E2=80=AFAM Ed Maste wrot= e: > > The branch main has been updated by emaste: > > URL: https://cgit.FreeBSD.org/src/commit/?id=3Dcaabdb3aefdc45cae902032100= 34086801fa9005 > > commit caabdb3aefdc45cae90203210034086801fa9005 > Author: Ed Maste > AuthorDate: 2026-07-21 18:10:00 +0000 > Commit: Ed Maste > CommitDate: 2026-07-21 18:27:47 +0000 > > contigmalloc.9: Note that M_WAITOK may still return NULL > > Reviewed by: markj, bapt > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D58382 > --- > share/man/man9/contigmalloc.9 | 11 ++++++++++- > 1 file changed, 10 insertions(+), 1 deletion(-) > > diff --git a/share/man/man9/contigmalloc.9 b/share/man/man9/contigmalloc.= 9 > index 2e5d55ae8ba1..a9ebaf100eb9 100644 > --- a/share/man/man9/contigmalloc.9 > +++ b/share/man/man9/contigmalloc.9 > @@ -23,7 +23,7 @@ > .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED = OF THE > .\" POSSIBILITY OF SUCH DAMAGE. > .\" > -.Dd July 26, 2024 > +.Dd July 21, 2026 > .Dt CONTIGMALLOC 9 > .Os > .Sh NAME > @@ -124,6 +124,15 @@ function returns a kernel virtual address if allocat= ion succeeds, > or > .Dv NULL > otherwise. > +Note that in contrast with > +.Xr malloc 9 , > +.Fn contigmalloc > +may return > +.Dv NULL > +even if > +.Dv M_WAITOK > +is specified, if no physically congiguous range is available that meets = the > +specified constraints. > .Sh EXAMPLES > .Bd -literal > void *p; > But is this desired and intentional behavior, or simply what the code does? Paging through grep of contigmalloc with M_WAITOK, it appears to be a mix of callers that handle and do not handle a NULL return. Some of them just handle it by panicking. Is someone planning to audit M_WAITOK callers? > +is specified, if no physically congiguous range is available that meets = the Typo: "congiguous". Ryan