From nobody Mon Aug 14 12:47:16 2023 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 4RPZ112MPDz4qS1G; Mon, 14 Aug 2023 12:47:17 +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 4RPZ105c1Qz3Br6; Mon, 14 Aug 2023 12:47:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1692017236; 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=2YXxs8w1c3wvg0sYKeJQ0ZJ7oxzxEJ5Z91hYU7DY/zQ=; b=p+xRWnLPZbQw8BrCSTcSMGeWAFuA6lStKqxJs4T1o1CTXLuPeQC40SVP5ReSrQpQ4TcYT4 d4HEjawpvdbMYtS9HyjpPgf8CtHYjD/GvulZxjcJOj64JVeMu2Jr6NyHqjoe7ZOLH+pBPf K8TJeeCIMe2bChRUaju87vWdLU1pylnNHZYJ+fBPD7pn2TANhZVU7crFq8NvbUo/l3LBm2 u4l40BWbDZpAlMpDAS0ATTViAFDr6I7ubkVDj0jbBTlfl1Rmpyd8Ou/KS8O2QlujNq8YZs RYAl6b1I1w7dNOIsAYpRGhMOfpiyQRgYPtvf6k4QZTzjZYYecOwBSbOSXQ1CXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1692017236; 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=2YXxs8w1c3wvg0sYKeJQ0ZJ7oxzxEJ5Z91hYU7DY/zQ=; b=Hkq9bgzP8mN7ucuBwL+WN8byuxLmySw3ZiQYPLzC/0CpYdRGYuC/QkpHZ4kWC4iF7ZJ8tq GHEtgRVGUYUC8oj8aAGB51ltidbq3nXHTv4yMXcND3LI9/+nfsYCGvivGqPzt+Qer7yPTJ 2UHbXGU2xZ2QyqbrLlvT7YT6s04YForxNymtbrcNA81WMSxLmsKVYL7Gs0Xu29yaZnb/Xi vd1R2Ak2amVs6KAjEtwlKxc4o4s10F7cQoHkS8T8QgQ+r43kLPprpZ2ycv1gmLn4JKdOTt p5kD8/k7XnA+sSXMLx5F8GgFyIVRSD7NO70GpD6EaihEUO/SR9/pfXNaiYvKLg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1692017236; a=rsa-sha256; cv=none; b=IRFeuRzrpYA8zOrps20GgKEkowVovNmC+9ERumB6YDpSMHucS3I5pa1p8/E6PSWkrXQoGN RydtiwTiRQAa7mPEJkVdmNW3b8nr4KelIpNK6p8DUHa9eRMyQqSJ0CncUOvnv3h/aziDMm np1HoR90KU3+MNvLXajFwarOitck9TMlLS0dN+3k/CUsk5UmKLNN3SD1LbnMteADf4Hc1S /vb7vxj4Q3fhzkYhi3MDj8QwuOW6EZJyDOavStsnA3Z+6mQhJllkhII69JxQ3EIjENU+Si K4QaZetrF6nDWhktiSyF8I5jIO4uJC8Ufx/Q0q2rtLkxQFyJPMTJoZxuaYp3Xw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4RPZ104c3VzTjy; Mon, 14 Aug 2023 12:47:16 +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 37EClGf7044277; Mon, 14 Aug 2023 12:47:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37EClGCP044274; Mon, 14 Aug 2023 12:47:16 GMT (envelope-from git) Date: Mon, 14 Aug 2023 12:47:16 GMT Message-Id: <202308141247.37EClGCP044274@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: a21238d843eb - main - linux(4): Improve readability of recvmsg control buffer copyout code 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: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a21238d843ebe02e696cdc30b008382dfca5612e Auto-Submitted: auto-generated The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=a21238d843ebe02e696cdc30b008382dfca5612e commit a21238d843ebe02e696cdc30b008382dfca5612e Author: Dmitry Chagin AuthorDate: 2023-08-14 12:46:12 +0000 Commit: Dmitry Chagin CommitDate: 2023-08-14 12:46:12 +0000 linux(4): Improve readability of recvmsg control buffer copyout code MFC after: 1 week --- sys/compat/linux/linux_socket.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/compat/linux/linux_socket.c b/sys/compat/linux/linux_socket.c index 791f59aaf552..1acd93122b8f 100644 --- a/sys/compat/linux/linux_socket.c +++ b/sys/compat/linux/linux_socket.c @@ -1866,10 +1866,9 @@ cont: lcm->cmsg_len = LINUX_CMSG_LEN(datalen); error = copyout(lcm, outbuf, L_CMSG_HDRSZ); if (error == 0) { - outbuf += L_CMSG_HDRSZ; - error = copyout(data, outbuf, datalen); + error = copyout(data, LINUX_CMSG_DATA(outbuf), datalen); if (error == 0) { - outbuf += LINUX_CMSG_ALIGN(datalen); + outbuf += LINUX_CMSG_SPACE(datalen); outlen += LINUX_CMSG_SPACE(datalen); } }