From nobody Sat Aug 19 18:56:17 2023 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 4RSnyT6LNHz4mLGB; Sat, 19 Aug 2023 18:56: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 4RSnyT5wfzz4bDK; Sat, 19 Aug 2023 18:56:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1692471377; 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=sg03gFM5vIhrbt4+ockOA1Mejuy47eAj2HNgNNfkTAg=; b=v1LXin3McYgZeUuVQfHTs8KFeRNj73forYS3mbIyhblfjXbaHGKiDmgnonhtynvCmfStjQ w1YmVDS72zTI/dPG9tM+JHTgRgKlY6YPAzJNiKJm9COwFwUsO4cUqlT8kY3/WvSBSmr7G0 c7DgctFXZb5IVpCWiU00Qub2fiFrzTIOFOfKdDOgE8uMmopTiyWSa8NQBDfESZ6vsS9khv kqKJOLzxTo+D44IW8L5m+5Sgvn+f8g2GBS3r5HI7G1EPJItFVPCytQAqBevZPyJGHBTWOc UY/XxdT+fHua2LHjY6jhfi+4aA25CVfPatAAdOylNgQOxqD7JzqbgDJwwFrdrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1692471377; 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=sg03gFM5vIhrbt4+ockOA1Mejuy47eAj2HNgNNfkTAg=; b=l43kt/Cb+a8ELHyDTDq2hv02JNo74MW4jsbJrJ304c35GLq5mZzhKJ87a06Mr5Sq3JhJWm 4R+Tex+CBoak9lKpspRqthtCbTH0x4Iin/6FyJMpoGeKBhvdzQ6o+Fa5dPcbL/fUtyN500 UWpH3/4cw6rsUF81YL65f/EwtUDutt3A76gsUr9ltGZjrtn5hKr/bCUJ5Kpa9cw1TVBwoK 8Ns4gcnbHUDWB9jfPczqRMdZSx+pYKkoC4qxg/c/heTfUD96s19LecDsDPUkfKYo6wjOIC CosPCm8EW+0fx/sQDy+wqZMHr3oyyyMdtrxmWLYzgr2TzfDuNiN0y+LBViML5Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1692471377; a=rsa-sha256; cv=none; b=FuBjn8EVvdcvq8nqyB7w9VpzFsXZXGnaeOMSFvfyMqEc0GO0gJ62YQaqoid7UP9Po7QGcY ImnkOJiLIcgKiEOZdDQtpq5a+acezAy0mmyU+Lsh+ckaMFgWxQb1M7ZEthGVa89ebwK/9L jVCNDa06DmhP73CwIWrJFDga3tU5DhFwfNwbucTVwk+1448xOxg7C2smWOg02wVbWSasTQ fO8RRqmADY/7WbMkrwKvjKbrRZQ7Ktc7r+rtHBF1MbqEmgPNAYOV10N3GTTG0vmAveMMsD 0oxifyGW9Ee/kDgaswm/iiTQmDULN0KbllRp/mfKtcPOJuuYiUUReNZ6sFV60A== 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 4RSnyT4m4qz1885; Sat, 19 Aug 2023 18:56:17 +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 37JIuHCm084237; Sat, 19 Aug 2023 18:56:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 37JIuH3B084234; Sat, 19 Aug 2023 18:56:17 GMT (envelope-from git) Date: Sat, 19 Aug 2023 18:56:17 GMT Message-Id: <202308191856.37JIuH3B084234@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: 4f9fac78d4da - main - linux(4): Return EAGAIN instead of ENOBUFS for non-blocking sockets in sendfile 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: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4f9fac78d4da662d4ae29c4e1d71c66cd29fcfbb Auto-Submitted: auto-generated The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=4f9fac78d4da662d4ae29c4e1d71c66cd29fcfbb commit 4f9fac78d4da662d4ae29c4e1d71c66cd29fcfbb Author: Dmitry Chagin AuthorDate: 2023-08-19 18:55:23 +0000 Commit: Dmitry Chagin CommitDate: 2023-08-19 18:55:23 +0000 linux(4): Return EAGAIN instead of ENOBUFS for non-blocking sockets in sendfile MFC after: 1 month --- 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 67736ecc69f6..834c2c938925 100644 --- a/sys/compat/linux/linux_socket.c +++ b/sys/compat/linux/linux_socket.c @@ -2570,6 +2570,8 @@ linux_sendfile_common(struct thread *td, l_int out, l_int in, else error = sendfile_fallback(td, fp, out, offset, count, &sbytes); + if (error == ENOBUFS && (ofp->f_flag & FNONBLOCK) != 0) + error = EAGAIN; if (error == 0) td->td_retval[0] = sbytes; }