Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754346Ab2KGXdR (ORCPT ); Wed, 7 Nov 2012 18:33:17 -0500 Received: from mail-pa0-f46.google.com ([209.85.220.46]:58448 "EHLO mail-pa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752652Ab2KGXdP (ORCPT ); Wed, 7 Nov 2012 18:33:15 -0500 Subject: Re: [PATCH] tcp: Avoid infinite loop on recvmsg bug From: Eric Dumazet To: Julius Werner Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Patrick McHardy , Hideaki YOSHIFUJI , James Morris , Alexey Kuznetsov , "David S. Miller" , Dave Jones , Sameer Nanda , Mandeep Singh Baines In-Reply-To: References: <1352316791-16491-1-git-send-email-jwerner@chromium.org> <1352317219.5552.6.camel@edumazet-glaptop> Content-Type: text/plain; charset="UTF-8" Date: Wed, 07 Nov 2012 15:33:12 -0800 Message-ID: <1352331192.2748.10.camel@edumazet-glaptop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1163 Lines: 29 On Wed, 2012-11-07 at 13:14 -0800, Julius Werner wrote: > > What I find very sad in all this is that you didnt mention the driver > > that was triggering this bug. > > Sorry, I was just trying to keep this thread focussed on one patch. > The bug report that led me to this is publicly accessible at > http://crosbug.com/35827. We have encountered the problem only once, > on an Acer AC700 Chromebook that ran automated tests. The ethernet > interface for the offending socket was provided by a USB-to-Ethernet > dongle using the smsc95xx/usbnet module (v1.0.4). This driver uses interesting skb_clone() games and skb->truesize lies : skb->truesize = size + sizeof(struct sk_buff); So you probably are fighting a bug we already fixed in upstream kernel. (commit c8628155ece363 "tcp: reduce out_of_order memory use" did not played well with cloned skbs.) This issue was already discussed on netdev in the past. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/