From patchwork Mon Dec 20 08:56:22 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Changli Gao X-Patchwork-Id: 76173 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 AF05DB6F1E for ; Mon, 20 Dec 2010 19:56:49 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754603Ab0LTI4o (ORCPT ); Mon, 20 Dec 2010 03:56:44 -0500 Received: from mail-fx0-f43.google.com ([209.85.161.43]:37734 "EHLO mail-fx0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754520Ab0LTI4n (ORCPT ); Mon, 20 Dec 2010 03:56:43 -0500 Received: by fxm18 with SMTP id 18so2759039fxm.2 for ; Mon, 20 Dec 2010 00:56:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type; bh=c1g4hDT40CGC3oDvb8EH5I9/Ogu915JTxshJxDyphsI=; b=FTeCPFq1lKss8JG/UASU7mw7VltGUpOcuQoXgAwBNWZkXP+Kk7uGqGckvkt6hXgF00 ioOLUEI1whDlFwfvGiHUyVKkaYQDf6darvPJTM4j3RMfzjPuFDhV+f/yn1HYIs5Ru0If B2e3joFntUS2N+2zDXqTxmVQP8A3MYDqDk7e0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=E6O9JaqYu536TQ1DUhhySDdwUxhUd2aw4igJ7YaZWg2dAjH/5XoCYrC8AphMlPXmrH KqFd4liC5h1in9n1RMa/RoG7MnBqBMedLAEhYN58KkQK9evArwteBGYwKIEyEL94OTPC zuwtgYV90n08eKidXHMV2FZMcRh24Asxg2VMM= Received: by 10.223.83.13 with SMTP id d13mr970501fal.139.1292835402634; Mon, 20 Dec 2010 00:56:42 -0800 (PST) MIME-Version: 1.0 Received: by 10.223.97.76 with HTTP; Mon, 20 Dec 2010 00:56:22 -0800 (PST) In-Reply-To: <4D0F0D73.2080807@itcare.pl> References: <4D0DEDF9.7020102@itcare.pl> <1292773433.18869.153.camel@edumazet-laptop> <4D0E2E52.3090802@itcare.pl> <4D0E6C6D.10806@itcare.pl> <4D0E8416.2030100@gmail.com> <4D0E857E.5060302@gmail.com> <4D0E868F.90005@gmail.com> <4D0F0D73.2080807@itcare.pl> From: Changli Gao Date: Mon, 20 Dec 2010 16:56:22 +0800 Message-ID: Subject: Re: Kernel panic eth2 mirred redirect to ifb0 To: =?ISO-8859-2?Q?Pawe=B3_Staszewski?= , "David S. Miller" Cc: Jarek Poplawski , Eric Dumazet , Linux Network Development list Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 2010/12/20 Paweł Staszewski : >> > Yes reverting this patch solves the problem. > > I am not sure reverting is the right fix. Maybe you can try this patch attached instead. BTW: there are some others NIC drivers and net_sched actions don't take care of shared skbs. diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index ca9036d..602cd32 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c @@ -6096,6 +6096,15 @@ static int ixgbe_tso(struct ixgbe_adapter *adapter, u32 mss_l4len_idx, l4len; if (skb_is_gso(skb)) { + if (skb_shared(skb)) { + struct sk_buff *nskb; + + nskb = skb_clone(skb, GFP_ATOMIC); + if (!nskb) + return -ENOMEM; + kfree_skb(skb); + skb = nskb; + } if (skb_header_cloned(skb)) { err = pskb_expand_head(skb, 0, 0, GFP_ATOMIC); if (err)