From patchwork Fri Jul 2 09:48:22 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Dumazet X-Patchwork-Id: 57636 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 99FA11007D2 for ; Fri, 2 Jul 2010 19:48:33 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758206Ab0GBJs2 (ORCPT ); Fri, 2 Jul 2010 05:48:28 -0400 Received: from mail-fx0-f46.google.com ([209.85.161.46]:42683 "EHLO mail-fx0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756910Ab0GBJs1 (ORCPT ); Fri, 2 Jul 2010 05:48:27 -0400 Received: by fxm14 with SMTP id 14so2137366fxm.19 for ; Fri, 02 Jul 2010 02:48:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:cc :content-type:date:message-id:mime-version:x-mailer :content-transfer-encoding; bh=As6m0dZOKFeFCvUcWFiXzBQ8EcSECK7iUr5Zcr4oe4s=; b=ATMKQjCMXoHftCRmtLZjcKVF0WTC4nw7a5Gta2ORzaKw4zKdnBc+ttDRBy8Y2q3IQY Ydo5gKUFWvDJlXWc07iwNwmGCgmrz9e04Je/L050JXHkf54+/IO82QZeSq0oQErCIW/8 WxS75mT4EFhe0YTxhE9yqD2fkLNOy1yh/MDLY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; b=YQ3IcbUHtYoNVqZSVXLpcVYLFp14LvTRobytfdmXL/6bl2MQLC0BnHjDy+U0931ZLC o26ooOfTqGr1vQB7CI64FtwKLJ8jeUAGpuZeYjqZV0gwSKqC4RzclEpmgwEtdpzlUHLt LdnoPRxSK/qzuge9XahFO2ZOm1NE2pRcBUh5k= Received: by 10.223.120.197 with SMTP id e5mr435911far.103.1278064104110; Fri, 02 Jul 2010 02:48:24 -0700 (PDT) Received: from [127.0.0.1] ([85.17.35.125]) by mx.google.com with ESMTPS id q8sm1074518faa.34.2010.07.02.02.48.23 (version=SSLv3 cipher=RC4-MD5); Fri, 02 Jul 2010 02:48:23 -0700 (PDT) Subject: [PATCH net-next-2.6] ipv4: use skb_dst_copy() in ip_copy_metadata() From: Eric Dumazet To: David Miller Cc: netdev Date: Fri, 02 Jul 2010 11:48:22 +0200 Message-ID: <1278064102.2530.29.camel@edumazet-laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Avoid touching dst refcount in ip_fragment(). Signed-off-by: Eric Dumazet --- net/ipv4/ip_output.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 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_output.c b/net/ipv4/ip_output.c index 7d1f4b4..d647852 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c @@ -411,7 +411,7 @@ static void ip_copy_metadata(struct sk_buff *to, struct sk_buff *from) to->priority = from->priority; to->protocol = from->protocol; skb_dst_drop(to); - skb_dst_set(to, dst_clone(skb_dst(from))); + skb_dst_copy(to, from); to->dev = from->dev; to->mark = from->mark;