From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============8937389527547709293==" MIME-Version: 1.0 From: Mat Martineau To: mptcp at lists.01.org Subject: [MPTCP] Re: [PATCH net] mptcp: sendmsg: reset iter on error Date: Fri, 14 Aug 2020 12:48:17 -0700 Message-ID: In-Reply-To: 20200814135634.12996-1-fw@strlen.de X-Status: X-Keywords: X-UID: 5557 --===============8937389527547709293== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On Fri, 14 Aug 2020, Florian Westphal wrote: > Once we've copied data from the iterator we need to revert in case we > end up not sending any data. > > This bug doesn't trigger with normal 'poll' based tests, because > we only feed a small chunk of data to kernel after poll indicated > POLLOUT. With blocking IO and large writes this triggers. Receiver > ends up with less data than it should get. > > Fixes: 72511aab95c94d ("mptcp: avoid blocking in tcp_sendpages") > Signed-off-by: Florian Westphal > --- > net/mptcp/protocol.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > Reviewed-by: Mat Martineau -- Mat Martineau Intel --===============8937389527547709293==-- From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.5 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B20D6C433DF for ; Fri, 14 Aug 2020 19:48:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 91E4C20675 for ; Fri, 14 Aug 2020 19:48:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727981AbgHNTsT (ORCPT ); Fri, 14 Aug 2020 15:48:19 -0400 Received: from mga12.intel.com ([192.55.52.136]:22055 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726213AbgHNTsS (ORCPT ); Fri, 14 Aug 2020 15:48:18 -0400 IronPort-SDR: KmZONe2E7z7H44lXCPzC3SmzPhKelNKFGGCEPQfi/e0w5fTE8ekWajUoK0uhxYTGk/0VzQJqwi GYaqsvN9VjyA== X-IronPort-AV: E=McAfee;i="6000,8403,9713"; a="134001312" X-IronPort-AV: E=Sophos;i="5.76,313,1592895600"; d="scan'208";a="134001312" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Aug 2020 12:48:18 -0700 IronPort-SDR: KTh8e2xzju8NbVtcMbxBTMQzUfRrdycN0zRTfqx65IAIDUpe+RhLBE15K+RaG4+hMaLh14Mxy3 mlw5urZAJ0KQ== X-IronPort-AV: E=Sophos;i="5.76,313,1592895600"; d="scan'208";a="440210759" Received: from cakenne1-mobl1.amr.corp.intel.com ([10.251.27.100]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Aug 2020 12:48:17 -0700 Date: Fri, 14 Aug 2020 12:48:17 -0700 (PDT) From: Mat Martineau X-X-Sender: mjmartin@cakenne1-mobl1.amr.corp.intel.com To: Florian Westphal cc: netdev@vger.kernel.org, matthieu.baerts@tessares.net, mptcp@lists.01.org Subject: Re: [PATCH net] mptcp: sendmsg: reset iter on error In-Reply-To: <20200814135634.12996-1-fw@strlen.de> Message-ID: References: <20200814135634.12996-1-fw@strlen.de> User-Agent: Alpine 2.23 (OSX 453 2020-06-18) MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Fri, 14 Aug 2020, Florian Westphal wrote: > Once we've copied data from the iterator we need to revert in case we > end up not sending any data. > > This bug doesn't trigger with normal 'poll' based tests, because > we only feed a small chunk of data to kernel after poll indicated > POLLOUT. With blocking IO and large writes this triggers. Receiver > ends up with less data than it should get. > > Fixes: 72511aab95c94d ("mptcp: avoid blocking in tcp_sendpages") > Signed-off-by: Florian Westphal > --- > net/mptcp/protocol.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > Reviewed-by: Mat Martineau -- Mat Martineau Intel