From nobody Thu Feb 17 12:54:34 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 3CEF119CAA85; Thu, 17 Feb 2022 12:54:35 +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 4Jzvt309mmz3FPt; Thu, 17 Feb 2022 12:54:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645102475; 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=/8iU3J2ma+Q1vyx7cJrr2P6sEkF6AoQyD9VHabglLI0=; b=vGN2vW4s+GNs9Of7AQgh0e3A21bK7v4RG1skDG6gOhtRLsPYhbCoefEHq0Ao5dL7Yt6PV/ PZlirFVXbrG7fVTnGW6bOE68nDtfJy2JLqXdHl53aI4D3HDmV+d463JKo0Mk8Q+VF44XhG OwZPu/iJoxtSjfsNmyTJw4+MD9pdBgZfu1s63TK5+rCMZ6lhf3GHA6PTMaMyJkibwxxddn YkglSNsrnrEQHfCTJiTHEnzcs+ghG+lgcLI9y2WPU4u6UDmB4LFx1HV3+Vz8N20fRJHwec NfjkJan91bS58TSJ32UZt6Ngyoivj7MvB+g5XpqfKYM9zhniib43MmAoFFxWTw== 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 775C120BD; Thu, 17 Feb 2022 12:54:34 +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 21HCsYO6080356; Thu, 17 Feb 2022 12:54:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 21HCsYQk080355; Thu, 17 Feb 2022 12:54:34 GMT (envelope-from git) Date: Thu, 17 Feb 2022 12:54:34 GMT Message-Id: <202202171254.21HCsYQk080355@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Edward Tomasz Napierala Subject: git: c80c9fd9f6bc - stable/13 - linux: Fix ENOTSOCK handling in sendfile(2) 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: trasz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c80c9fd9f6bccd35b6f7817149285c278c12025d Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645102475; 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=/8iU3J2ma+Q1vyx7cJrr2P6sEkF6AoQyD9VHabglLI0=; b=mg5K6jZNgzZZS+9KVqlxQTLBZsRiRGsvE5ojJVOq1PNR0vVcL1m9ohzlc9GWYS0bE8XEgp tbReJiC1AceVJ4bnvDuqG9fTo70Shx/HQEw8Ku2n+pkRfJtXzADHsh7pRcfsCr4vqsqgUH Q94hlguW52H63RziPlwhSiyEHQStCwM446hmswZPSHq873hH8of+TAJMKXI+eObXZUVBZt HQcs+BSKeq1mmkStDt0+hOE72Xo1c2SjtWcYaz1GoqUlMnbF9UR+9ExoxUcmxWh6XgwMVj WG3PZX8ASih2xdaqH5GohJH4c/qz8fJQPTfs0+C2qLPes+txRCG2Jmlf2xIICw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1645102475; a=rsa-sha256; cv=none; b=FilA7+MBE2izwGiDqRKEUVzcN8V9nUBX0JXr0KZQyruRolIQBqGmaja4+As0z3OfajUl5t EALD9pyZrdbP4saT+L6yMk+1wSrYC3Z+oEEMVE9Q1aCQOBruVS/5BEQfOoAsoclsSTZxC4 tqfpjf45BkZx306PNMTP9+3/pu2QygGsMHw/2SC0LzVZ7J7bwKE9vA+NZqOujUWoVszYF8 FtP6RlElj72cTPRbg90J6dew+45vTM1+BbyCUZPs4C84PSRe5/gdroUBdeiuIAJmpIYQ/I R95TZpdveTs9mgzNFLY0O8+IrNXrCEAjTgf+YbxO54HT260rPtuzcQopkvbUZw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=c80c9fd9f6bccd35b6f7817149285c278c12025d commit c80c9fd9f6bccd35b6f7817149285c278c12025d Author: Edward Tomasz Napierala AuthorDate: 2021-10-23 08:15:37 +0000 Commit: Edward Tomasz Napierala CommitDate: 2022-02-13 22:25:12 +0000 linux: Fix ENOTSOCK handling in sendfile(2) The Linux way for sendfile(2) to tell the application to fallback to another way of copying data is by EINVAL, not ENOTSOCK. This fixes package installation scripts for Mono packages from Focal. Sponsored By: EPSRC Differential Revision: https://reviews.freebsd.org/D32604 (cherry picked from commit 2c7f7982825442c851e8bb17555a086a232ef4d9) --- sys/compat/linux/linux_socket.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/compat/linux/linux_socket.c b/sys/compat/linux/linux_socket.c index 707426582bbc..e9d9e3f60fcf 100644 --- a/sys/compat/linux/linux_socket.c +++ b/sys/compat/linux/linux_socket.c @@ -2057,6 +2057,8 @@ linux_sendfile_common(struct thread *td, l_int out, l_int in, td->td_retval[0] = (ssize_t)bytes_read; drop: fdrop(fp, td); + if (error == ENOTSOCK) + error = EINVAL; return (error); }