From patchwork Sun Jul 24 19:02:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Al Viro X-Patchwork-Id: 9245025 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 941B960487 for ; Sun, 24 Jul 2016 19:03:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 860A32522B for ; Sun, 24 Jul 2016 19:03:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7A26C26224; Sun, 24 Jul 2016 19:03:07 +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=-6.9 required=2.0 tests=BAYES_00,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 31CB92522B for ; Sun, 24 Jul 2016 19:03:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752279AbcGXTCn (ORCPT ); Sun, 24 Jul 2016 15:02:43 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:51810 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751636AbcGXTCm (ORCPT ); Sun, 24 Jul 2016 15:02:42 -0400 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.86_2 #1 (Red Hat Linux)) id 1bROfd-0004pn-DJ; Sun, 24 Jul 2016 19:02:37 +0000 Date: Sun, 24 Jul 2016 20:02:37 +0100 From: Al Viro To: Christian Lamparter Cc: Alan Curry , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, alexmcwhirter@triadic.us Subject: Re: PROBLEM: network data corruption (bisected to e5a4b0bb803b) Message-ID: <20160724190237.GP2356@ZenIV.linux.org.uk> References: <201607240335.u6O3ZE81014171@sdf.org> <1659922.nTqITfJpFk@debian64> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1659922.nTqITfJpFk@debian64> User-Agent: Mutt/1.6.1 (2016-04-27) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Sun, Jul 24, 2016 at 07:45:13PM +0200, Christian Lamparter wrote: > > The symptom is that downloaded files (http, ftp, and probably other > > protocols) have small corrupted segments (about 1-2 kilobytes long) in > > random locations. Only downloads that sustain a high speed for at least a > > few seconds are corrupted. Anything small enough to be received in less > > than about 5 seconds is not affected. Can that sucker be reproduced with netcat? That would eliminate all issues with multi-iovec recvmsg(2), narrowing the things down quite bit. Another thing (and if that works, it's *NOT* a proper fix - it would be papering over the problem, but at least it would show where to look for it) - try (on top of mainline) the following delta: --- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/net/core/datagram.c b/net/core/datagram.c index b7de71f..0ee5995 100644 --- a/net/core/datagram.c +++ b/net/core/datagram.c @@ -734,7 +734,7 @@ int skb_copy_and_csum_datagram_msg(struct sk_buff *skb, if (!chunk) return 0; - if (msg_data_left(msg) < chunk) { + if (iov_iter_single_seg_count(&msg->msg_iter) < chunk) { if (__skb_checksum_complete(skb)) goto csum_error; if (skb_copy_datagram_msg(skb, hlen, msg, chunk))