From nobody Tue Jul 21 18:57:41 2026 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 4h4RTt6qxDz6mKHK for ; Tue, 21 Jul 2026 18:57:54 +0000 (UTC) (envelope-from rlibby@gmail.com) Received: from mail-yw1-f177.google.com (mail-yw1-f177.google.com [209.85.128.177]) (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 4h4RTt4SRJz3Dxb 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-f177.google.com with SMTP id 00721157ae682-81ed000b507so62699867b3.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=1784660274; x=1785265074; 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=QTTJk+4jmYSpvAIYYmGdV/4Yswhiy51rqEs8Wgt+mc2oJRTrNCguU8b/Loj5H5DxVN 64ieuDfl1XNpFcyl1QnNGoWAJL3thOaNSh4wpIXehMf5frnoZukGa/WH4beDQNxtPQLE 2Zl7pVHQPF3n/xUI1WntSKa/eIwl8GZO8JrezXb+g/KioV2DphxJc9t5jZ2E6xZMS0Fs iacd5fjWUrHUlrM9k4KO8H27W7giQhvcWbfjypUqLxSoCFu1WMxSRufCPvlm4HJohpqG GSx9mULiI2Uj+O2+mT5eTgwOw3wSg7LLlSGCYoANNSKUSvSGUrCE58ZHK8J6HrVV7nR1 +esA== X-Forwarded-Encrypted: i=1; AHgh+RrjtjufjPcXCne4c30IgBeXz2/UjSGT+MWeMvQARJTy1e/rO+aFAbl+J4Oh6fK8r7wN1n4dZwrtS0YJPPKv6pNb8rJW@freebsd.org X-Gm-Message-State: AOJu0YyFm8YJ6Dc9ct3i6mbILM98thuA+V7SdgY2akowu2P/a6V6epH3 3xCQiXqqIWsGVBQdrRG9Z4HkwBF1HMtxHG/1FpDJQtw9bp/Is59Deart/QduCA== X-Gm-Gg: AR+sD13b6rXE990pNb8q6zxQKlCM1Rzp5j4lBU1cf/gLGrCvvPmglzjjDUexmSqbcEA bs1JMvk3S8oTcW1Zj6RJq8i7xkjBFDWLml3y0u74QswCL+1+fgvxBOpl3IgzTlixlHndzeqzJzg jAAuLrgI6sEWofyY2M7Yl2OuenfeHedqzgmQLjHIKQzAyoeMmwUvAgOG25I4+haMODgpD+tXw+9 fSFCmmceYpHTzih7kH+We2kDGfMZkQjmIX758A5zhNxqyObEMt+tUZDC3/9alerG1L2n2GEsm1s rPUaAikcptBpH1dP3s7DZBcK+ObRMpOiBMvq1mStyQf1YTfdwQ6z8lTJ5uMPn9HowQrjEfkj8Hc VtkubHmLY+yPPLybQnCZw3ZnDmI6DzNbXv734il1LqqN7YjVeX0WCxXxLiFQbrQ+H3pERw5jaLy WtWjxnk2+f9pRE/3SyrOCDPgxFIeAizqTfqGrDrSA0 X-Received: by 2002:a05:690c:6304:b0:81e:cf42:5536 with SMTP id 00721157ae682-81ef2632868mr57985907b3.64.1784660273714; Tue, 21 Jul 2026 11:57:53 -0700 (PDT) Received: from mail-yw1-f181.google.com (mail-yw1-f181.google.com. [209.85.128.181]) by smtp.gmail.com with ESMTPSA id 00721157ae682-81f33c34ebdsm2395157b3.13.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:53 -0700 (PDT) Received: by mail-yw1-f181.google.com with SMTP id 00721157ae682-81ed000b507so62699697b3.0 for ; Tue, 21 Jul 2026 11:57:52 -0700 (PDT) X-Forwarded-Encrypted: i=1; AHgh+RqfWD0WHyCpSfseo9BPlsrDoYN7sbUIR8tefVJd9vZgZ/QeoKBBjQZR8snb7NAH/Mv1GTZD1nFzdeuB7Qkq2dPUi2oY@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 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 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: 4h4RTt4SRJz3Dxb 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