From nobody Sat Mar 23 05:45:43 2024 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 4V1p874zWVz5DZ9R; Sat, 23 Mar 2024 05:45:43 +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 4V1p871xv3z4CW5; Sat, 23 Mar 2024 05:45:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711172743; 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=207t5eiFcVwdESvVEuuOjQsnQjQnO5/uaQA4SeOLktg=; b=PF3A/Ihz51U0dslXCk7VgYKZDShLrWqH/ysdFS3/8GKVvLhl33hnBFVtRB+4IHWhD9jFu9 rCgt4+/ygorOizTyVHC4mLyzujOv5XX0wb1BB2WeJkBvqJiz+K6+dlFSjCVKaN0uwdlOOn TSKlUPnw+rkYObrIwSiwj4ZTrcbFFJnd8ppGXIsPCcgNLbgXlTd8yfq63N0LqqTM3GfJxH KbjObJIi7EvmcBxbfEYvR1oaHrrGnHk++byyluPRNTmyqdY6jb3wH1UjOu0xYUsmZ4U8Ej Y3C+Dv9BhGGZYnQsU941vcGbxG2v1X8Kqf+o+T7ZUVvK31QCG0uX/o9PqhV4xg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711172743; a=rsa-sha256; cv=none; b=JKGXut7/MH5qD/iPU56Any4kZeQZtYmnoCOlI08+2ak5JFbB22Aelw0V7RC1Yx7ZNGWUkX btgzFk3Ybsa7g57G0VaTrnyUJzZhsF3jYTAIycl5kiGDf7ml9ytpbizSf3/fWAmEKHQQV0 wnfkRRTkItJC/fv1HLCzvmqxiIMNx+fCgC1LZ4algWNNwpR46VxUFRSZmwgTL9tejlJWbC IVD0/xkwARp98r0sryABIMaA9kJH8/WzMqAPoo/vZM5+iOo4WAI0hH8/0vNBcwub8mniBv TXU3qI6dDpXHjVJJ8RvStSj66N/ZDXD8rShgZqUyOxjs8kPQ5hNuiZpc1K3uuA== 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=1711172743; 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=207t5eiFcVwdESvVEuuOjQsnQjQnO5/uaQA4SeOLktg=; b=d9iij503O0Un0HIA+65KajRkfYIqo4y2QUGtI4OSDsT7sVL/zhqTz8iQpi4AiS5qG8/o5y K7IJ3S2ewCI5mh/HGT5Bf5Tml0q0F3h8OI9fT6l6Flg/Fh1xtSE6ulXII+bsCG02/6WbQ6 ysb0TdLYHHd5FBz1R/vwHFfmFnP31lPKFIGLMsgDrAI2vhSyNqaa/4fyuRlXrm+XjNEkI+ UJ/TMKfoAy8ajQNw+ffARxmuXY3dKdUbcpHUBB0PEOEJRilb0eWyoWatB6EQ0xWs/3DXUO m4ha6vMOJ8WGbdMjxnBy3WZU4phiiF2ERpL2mt6k9mFpptgWfP0TlvBD0E9iqg== 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 4V1p871Ljyzc7M; Sat, 23 Mar 2024 05:45:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42N5jhuI046970; Sat, 23 Mar 2024 05:45:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42N5jhKX046967; Sat, 23 Mar 2024 05:45:43 GMT (envelope-from git) Date: Sat, 23 Mar 2024 05:45:43 GMT Message-Id: <202403230545.42N5jhKX046967@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: 26389b308d97 - main - soreceive_dgram: assert that a datagram has control or data 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: 26389b308d97f90a1c196a85666142965bf0737c Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=26389b308d97f90a1c196a85666142965bf0737c commit 26389b308d97f90a1c196a85666142965bf0737c Author: Gleb Smirnoff AuthorDate: 2024-03-23 05:44:16 +0000 Commit: Gleb Smirnoff CommitDate: 2024-03-23 05:44:16 +0000 soreceive_dgram: assert that a datagram has control or data --- sys/kern/uipc_socket.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index 9a29df8b0340..b70864cbf2a4 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -2872,10 +2872,7 @@ soreceive_dgram(struct socket *so, struct sockaddr **psa, struct uio *uio, M_NOWAIT); m = m_free(m); } - if (m == NULL) { - /* XXXRW: Can this happen? */ - return (0); - } + KASSERT(m, ("%s: no data or control after soname", __func__)); /* * Packet to copyout() is now in 'm' and it is disconnected from the