From patchwork Thu Mar 14 15:29:06 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Dumazet X-Patchwork-Id: 227706 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id EBBF52C00C9 for ; Fri, 15 Mar 2013 02:29:19 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932649Ab3CNP3O (ORCPT ); Thu, 14 Mar 2013 11:29:14 -0400 Received: from mail-ea0-f179.google.com ([209.85.215.179]:56434 "EHLO mail-ea0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755785Ab3CNP3M (ORCPT ); Thu, 14 Mar 2013 11:29:12 -0400 Received: by mail-ea0-f179.google.com with SMTP id f15so1038849eak.24 for ; Thu, 14 Mar 2013 08:29:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:subject:from:to:cc:date:in-reply-to :references:content-type:x-mailer:content-transfer-encoding :mime-version; bh=2tfGFO8HgHKWnLD58eO//Yu7mWtiNZGaaChPFYWwUBM=; b=s91ZCdqARUJMZuiOwpP7W7kS1Reci8ze3iFFGmWhetCyGL00bTKbkSAxjVq5PUmbSx MoM4OTu1/SFJC70bpsRPnNe6gL8nMYXiNEMEx8jIm1Ktb1Lhu89HIEmDpPAHQYcWtLFI gOL9OzbqVeZrEUsyAU+FphF5bndaguZ+G1Ral6UY3O3f2vpZL/x43VcwkQoLGghofOcQ MXn+JWaPMujjEpZ2pkG0Laj5VCiY11k9rcCglPdFNH2t2B6WOvneA9c8Y8S1Lv0iIJp5 S0qLbqV5kYKteUqic3s7UblH6DlUYZ1A/IeQlDsVlRYjtFBM+k/YZ3YDV2TK7y3pGDFE drDg== X-Received: by 10.14.209.131 with SMTP id s3mr7867149eeo.26.1363274950935; Thu, 14 Mar 2013 08:29:10 -0700 (PDT) Received: from [172.16.38.10] ([172.16.38.10]) by mx.google.com with ESMTPS id f47sm4285183eep.13.2013.03.14.08.29.08 (version=SSLv3 cipher=RC4-SHA bits=128/128); Thu, 14 Mar 2013 08:29:09 -0700 (PDT) Message-ID: <1363274946.29475.24.camel@edumazet-glaptop> Subject: Re: [RFC PATCH] udp: don't rereference dst_entry dev pointer on rcv From: Eric Dumazet To: Tom Parkin Cc: David Miller , netdev@vger.kernel.org Date: Thu, 14 Mar 2013 16:29:06 +0100 In-Reply-To: <1363273531.29475.21.camel@edumazet-glaptop> References: <1362695800-8633-1-git-send-email-tparkin@katalix.com> <1362695800-8633-2-git-send-email-tparkin@katalix.com> <1362696444.15793.220.camel@edumazet-glaptop> <20130307.181527.390191009324148471.davem@davemloft.net> <20130313232743.GA3686@raven> <1363223884.29475.0.camel@edumazet-glaptop> <20130314144550.GB2512@raven> <1363273531.29475.21.camel@edumazet-glaptop> X-Mailer: Evolution 3.2.3-0ubuntu6 Mime-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Thu, 2013-03-14 at 16:05 +0100, Eric Dumazet wrote: > On Thu, 2013-03-14 at 14:45 +0000, Tom Parkin wrote: > > On Thu, Mar 14, 2013 at 02:18:04AM +0100, Eric Dumazet wrote: > > > Ah thanks for this, as this definitely makes more sense ;) > > > > > > Could you try the following fix ? > > > > > > diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c > > > index b6d30ac..87f4ecb 100644 > > > --- a/net/ipv4/ip_fragment.c > > > +++ b/net/ipv4/ip_fragment.c > > > @@ -529,6 +529,7 @@ found: > > > qp->q.meat == qp->q.len) > > > return ip_frag_reasm(qp, prev, dev); > > > > > > + skb_dst_force(skb); > > > inet_frag_lru_move(&qp->q); > > > return -EINPROGRESS; > > > > > > > Thanks Eric, with this patch I can no longer reproduce the oops :-) > > Thanks for testing. > > I am considering an alternative patch : > > We can drop the reference instead, and use the dst of the last skb. > > This would help to not dirty the dst refcount. > > I'll send an updated version. > OK, I tested the following one instead, please test it so that I can send an official patch. Thanks --- To unsubscribe from this list: send the line "unsubscribe netdev" 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/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c index b6d30ac..2d23830 100644 --- a/net/ipv4/ip_fragment.c +++ b/net/ipv4/ip_fragment.c @@ -529,6 +529,7 @@ found: qp->q.meat == qp->q.len) return ip_frag_reasm(qp, prev, dev); + skb_dst_drop(skb); inet_frag_lru_move(&qp->q); return -EINPROGRESS;