From nobody Wed May 25 07:19:56 2022 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 ABEAF1AEFD47; Wed, 25 May 2022 07:19:56 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4L7Ms8488Yz3jND; Wed, 25 May 2022 07:19:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1653463196; 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=WK5ytiqDyt+yY4cVEDt/IQ/syGi6LEVjNWAnMaNomgs=; b=FutecleOqZbDzcSrNnCzhMx8e7myjXDbNQpdUXxj5iAJjCIp2upR80yMRTG+Sy4++ZtvF/ d2eHXG/bfsLaES5a3xmWWBOzvTP3XOMiLq13U3hbDBwNvFjQKdbhZokSpqJDEKOaWHAFgu 63aOkiC0wmGLK9mQGGYnvbVIWGDZ57KQ/KHs8OxHfbNQj0GzVK6Onlz89VTLmOkV8tFxYK LimnlI5Gm1Pz/thyF32yAo3Ke06oPb91MT0CXWoe+KPbLo72EPOdO7rvH+KmVUmdJJRQGF EoWElVbJgBGpLie5f9eyDJgjBS4Z93ij+79PsyjvwJRVEe6KB7nN6CHgdojABQ== 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 6EA57149E3; Wed, 25 May 2022 07:19:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 24P7JuFu071867; Wed, 25 May 2022 07:19:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 24P7JuUk071866; Wed, 25 May 2022 07:19:56 GMT (envelope-from git) Date: Wed, 25 May 2022 07:19:56 GMT Message-Id: <202205250719.24P7JuUk071866@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: ad51c47fb431 - main - sockbuf: fix assertion in sbcreatecontrol() 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ad51c47fb43139b49aafdde615f9e21cbc943238 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1653463196; 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=WK5ytiqDyt+yY4cVEDt/IQ/syGi6LEVjNWAnMaNomgs=; b=BkVrXD9w8QtmDAsMSu49zbsz6E/YdLCQFD6KCM22Pzmn8G7nTpv0dOdm/tdR2Kf0NFqzdw IMTPVa9JJEEf4DbNcuYoVoB3U5Z3K8jSEsedCreH1Njv2XT8ipz+N7O+A7lVC7+NgKbNGR hd8KCSojqQC6HXRMkhXrV0NaFH5NrqIRYOTsM96ij4GPW6HgzcIY9mYxgWZ5tnXqq7dsz/ 98/4g6ZiI+Hzv2DMc5KaWPEusGjQxPXKCheNxY+Hy1+g5Z1/Y/u03K3wsfecvkudU5LAIy UT/CXceWvTeqt86ORAmpvWheRH7qgb7aRAv5I6ZaxT1+SqmoHlNtdT0+6ZTWfA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1653463196; a=rsa-sha256; cv=none; b=KESiQmYRE4YdQjkUwVkT3x0Q5PJ+9eb/WgGmYmEdukRIgyUzbsodP33gddnjYUivZjUyF/ KFJjDrkeBKzNN0BP+szS61CWqHTn/AUMsRTeKrZV2YXzk9AOU0MEXM+iXDlR85qaGz8rDZ ZV81jh2cVF2yMnDoCCJomBHZyUxdmLqMfUj935KYK2ErszIxcMkv3HbDmbX+rdGXOKxUGJ D9kz03SL58XH1EN0RGAagjJx+aTYiElImKpjkUKHf15AeZGsBjVK+05l6UXOJTS8CrBF+g CcP2tujORRHlsc6dztIEQ/aPs1Dvqq9fM1FG5u1Xt63hVvUv7F29vQ6rMMK34A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=ad51c47fb43139b49aafdde615f9e21cbc943238 commit ad51c47fb43139b49aafdde615f9e21cbc943238 Author: Gleb Smirnoff AuthorDate: 2022-05-25 07:19:41 +0000 Commit: Gleb Smirnoff CommitDate: 2022-05-25 07:19:41 +0000 sockbuf: fix assertion in sbcreatecontrol() Fixes: 6890b588141a8298fc8a63700aeeea4ba36ca3f9 --- sys/kern/uipc_sockbuf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/uipc_sockbuf.c b/sys/kern/uipc_sockbuf.c index e3a9f92d8da0..bc0a48a37810 100644 --- a/sys/kern/uipc_sockbuf.c +++ b/sys/kern/uipc_sockbuf.c @@ -1771,8 +1771,8 @@ sbcreatecontrol(const void *p, u_int size, int type, int level, int wait) if (CMSG_SPACE(size) > MCLBYTES) return (NULL); } else - KASSERT(size <= MCLBYTES, ("%s: passed size %u > MCLBYTES", - __func__, size)); + KASSERT(CMSG_SPACE(size) <= MCLBYTES, + ("%s: passed CMSG_SPACE(%u) > MCLBYTES", __func__, size)); if (CMSG_SPACE(size) > MLEN) m = m_getcl(wait, MT_CONTROL, 0);