From patchwork Wed Dec 26 23:05:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Randall S. Becker" X-Patchwork-Id: 10743319 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 52D0813AD for ; Wed, 26 Dec 2018 23:05:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 42B32283E7 for ; Wed, 26 Dec 2018 23:05:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 370C028451; Wed, 26 Dec 2018 23:05:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E019D283E7 for ; Wed, 26 Dec 2018 23:05:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727093AbeLZXFt (ORCPT ); Wed, 26 Dec 2018 18:05:49 -0500 Received: from sonic315.consmr.mail.bf2.yahoo.com ([74.6.134.253]:44534 "EHLO sonic315-17.consmr.mail.bf2.yahoo.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726966AbeLZXFt (ORCPT ); Wed, 26 Dec 2018 18:05:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rogers.com; s=s2048; t=1545865548; bh=aHCDJPX9Tdx+uImJw/KTaMH/aCokILHqrz6P5Eng9Ks=; h=From:To:Cc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EtHtsuYcXk9_5tb1sX.o9IjRrtKvjbTIzYTqgSzp8YFlyWWxeqdU3h9WCSOtjrQGp AcT1fj7bBVRN3VAAQh7jqIlsBHrXQ4ml._wgbD7714QPfbjn6MEv0VY2VVP5iHrVGHH3VR4vHUWZ Lgyp_LVfe55Hz4H_0PSIT0iZ8zJhiiUpKEwB1.AJNSEM8Zljxwtn0wa7jgoaxa3PrzKY5Zx4PNsz He2jVd6_iz92ZUYSX5iiVuLhKQgovXZ4f4Fv0g59y7_dNi5oQjT2JMvQ3bP0NLCPvfzCX2Q5Gtzg kYsGYWW7JlCME6FViwystB8mlT5aYU_INziRfvH1ZvNryHPu49kAj2Eml1diJl7BK_Xkl1lKYWgc RoiEsw2NmJRsECvFOLziuJbZqkj1KM7xHCVQ2_N3jKYxiAVIykwLDjPmMZSUp85E7k3X6uSzJ1vh q53.0vkYud25_sXZWHL1MGRf8Qw-- Received: from sonic.gate.mail.ne1.yahoo.com by sonic315.consmr.mail.bf2.yahoo.com with HTTP; Wed, 26 Dec 2018 23:05:48 +0000 Received: from 99.229.179.249 (EHLO localhost.localdomain) ([99.229.179.249]) by smtp429.mail.bf1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 98f6f8df7851f5cc32b027b3d2c09fa1; Wed, 26 Dec 2018 23:05:46 +0000 (UTC) From: randall.s.becker@rogers.com To: git@vger.kernel.org Cc: "Randall S. Becker" Subject: [PATCH v1 1/4] transport-helper: use xread instead of read Date: Wed, 26 Dec 2018 18:05:20 -0500 Message-Id: <20181226230523.16572-2-randall.s.becker@rogers.com> X-Mailer: git-send-email 2.12.3 In-Reply-To: <20181226230523.16572-1-randall.s.becker@rogers.com> References: <20181226230523.16572-1-randall.s.becker@rogers.com> Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: "Randall S. Becker" This fix was needed on HPE NonStop NSE and NSX where SSIZE_MAX is less than BUFFERSIZE resulting in EINVAL. The call to read in transport-helper.c was the only place outside of wrapper.c where it is used instead of xread. Signed-off-by: Randall S. Becker --- transport-helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/transport-helper.c b/transport-helper.c index bf225c698f..a290695a12 100644 --- a/transport-helper.c +++ b/transport-helper.c @@ -1225,7 +1225,7 @@ static int udt_do_read(struct unidirectional_transfer *t) return 0; /* No space for more. */ transfer_debug("%s is readable", t->src_name); - bytes = read(t->src, t->buf + t->bufuse, BUFFERSIZE - t->bufuse); + bytes = xread(t->src, t->buf + t->bufuse, BUFFERSIZE - t->bufuse); if (bytes < 0 && errno != EWOULDBLOCK && errno != EAGAIN && errno != EINTR) { error_errno(_("read(%s) failed"), t->src_name);