From nobody Tue Jun 23 16:28:18 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 4gl9VB2mxBz6hhWk for ; Tue, 23 Jun 2026 16:28:18 +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 "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gl9VB1Llwz3MbM for ; Tue, 23 Jun 2026 16:28:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1782232098; 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=3jlDu0ontuej8ao+Gh32k3u1oLqLl33Ybbusau2ynms=; b=f9pFwtHwsZufoGNOXGQDwcu3pWGoC8+q3hX0NR+Yxqfq/7QG2heRmpCmdpQAcazxz0EPk/ qhQKAU5xXg4kZKy3iXdjE98xUmVTYiXLj9mJJA5+LzQgwKpY1sft8zVeZQTRP1ltipqpdw 9Ez6H28qQIhqdud8Y3kgCm+vwPQvoDNc7UndgCHBM5VI0wA7dHWjgsN1EqtguXxbtW8oJ6 ugm4hGGjZ/v5t3I1xY8/SVEEYpDdFNr8YoSj/+RmF+8tNfBsnYEdd+32lunhcD76O6Ya6Z nDb/k7NW9ciVPjQIATGckUkDJv5fZXevCfFzETMi+loHlLKzfZizFqXRJRd09Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1782232098; a=rsa-sha256; cv=none; b=CVq1nMtZyn6I6URMqbtex9AQFMOlEfjJ2y5Q556fGHTUu5txAO5MTyX8b4br0WePXHtj75 an7Gsm0P8L8sAU4ZL5eqiQJaqJQfYlR4CTumxVLVKTUS5FWNrPVSpu1hRpsN1U5/AayzdM fvtsyRGOxyoJ1QZgloBWh6siD46mFbuP/YiRVR5+RFVNL0dU/9iqr6JLt5QfXPSPd0RVru N4yQawfnvN/6haTVQ4NnwYnG869I8ps+ZTNYdRHpsZdSm+LMLIQbk3lAOOd43XmVLW8tL2 iBvKIctSoQULyy1ucAxiW+xzU3VEfJYDDvanVjnV92tkSHBDnEVIu1Z3VNDPog== 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=1782232098; 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=3jlDu0ontuej8ao+Gh32k3u1oLqLl33Ybbusau2ynms=; b=EZ1+mEC4fD6spt3LE3g/kxtPjBy1dWzFxYBbG3SJrK1QTbvOs89Io/EgIsPRryR5f4c4NM IItYocBhfuKdiTXyF+krif4UQz42Q76iFGCDAvcOCXtXKhS1pIVOcRyFdIVofLndHyeZO5 c/Hvj8o9AjourQnNTOw9Ln25OhbAVmyRdMGTMw81FTajhAIdvF5xGoToxHBqq2fY1/TtSb aXTJRFCgKjd4g0sxwSYhempS/izKC5iAnmXjeQcngN4qLiUlYi60xcyqXAO+soeUCVimAC Jxf4YGn5Z1Cbon3Qy5MzBt2an6jvSbv7tL1zxgHdluI7cSe6cgR8iQ34fT8fDw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gl9VB0B8JzhbC for ; Tue, 23 Jun 2026 16:28:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26070 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 23 Jun 2026 16:28:18 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 12683573afb3 - stable/15 - kobj: Use M_WAITOK in kobj_init 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 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: 12683573afb3f01111c1972c50396528b02bbd80 Auto-Submitted: auto-generated Date: Tue, 23 Jun 2026 16:28:18 +0000 Message-Id: <6a3ab422.26070.22db1933@gitrepo.freebsd.org> The branch stable/15 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=12683573afb3f01111c1972c50396528b02bbd80 commit 12683573afb3f01111c1972c50396528b02bbd80 Author: John Baldwin AuthorDate: 2026-05-06 20:53:46 +0000 Commit: John Baldwin CommitDate: 2026-06-23 16:06:52 +0000 kobj: Use M_WAITOK in kobj_init Blocking allocation is safe in all of the current callers of kobj_init (most of them do a M_WAITOK malloc of the structure passed as the first argument to kobj_init just before calling it). kobj_init doesn't return an error code but instead panics if the nested malloc in kobj_class_compile1 fails, so using M_WAITOK here is more robust. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D56625 (cherry picked from commit 5df7dae10dc02ade8639b0171e0d3cc8db790e41) --- sys/kern/subr_kobj.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/subr_kobj.c b/sys/kern/subr_kobj.c index 09fd730660c4..a88639289954 100644 --- a/sys/kern/subr_kobj.c +++ b/sys/kern/subr_kobj.c @@ -308,7 +308,7 @@ kobj_init(kobj_t obj, kobj_class_t cls) { int error; - error = kobj_init1(obj, cls, M_NOWAIT); + error = kobj_init1(obj, cls, M_WAITOK); if (error != 0) panic("kobj_init1 failed: error %d", error); }