From patchwork Thu Jan 6 12:44:39 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Horman X-Patchwork-Id: 459141 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p06Cisur015177 for ; Thu, 6 Jan 2011 12:44:55 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752061Ab1AFMoo (ORCPT ); Thu, 6 Jan 2011 07:44:44 -0500 Received: from kirsty.vergenet.net ([202.4.237.240]:35642 "EHLO kirsty.vergenet.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751692Ab1AFMoo (ORCPT ); Thu, 6 Jan 2011 07:44:44 -0500 Received: from ayumi.akashicho.tokyo.vergenet.net (219-109-213-121.bitcat.net [219.109.213.121]) by kirsty.vergenet.net (Postfix) with ESMTP id C98C624050; Thu, 6 Jan 2011 23:44:39 +1100 (EST) Received: by ayumi.akashicho.tokyo.vergenet.net (Postfix, from userid 7100) id 49558EDE161; Thu, 6 Jan 2011 21:44:39 +0900 (JST) Date: Thu, 6 Jan 2011 21:44:39 +0900 From: Simon Horman To: Eric Dumazet Cc: Rusty Russell , virtualization@lists.linux-foundation.org, Jesse Gross , dev@openvswitch.org, virtualization@lists.osdl.org, netdev@vger.kernel.org, kvm@vger.kernel.org, "Michael S. Tsirkin" Subject: Re: Flow Control and Port Mirroring Revisited Message-ID: <20110106124439.GA17004@verge.net.au> References: <20110106093312.GA1564@verge.net.au> <1294309362.3074.11.camel@edumazet-laptop> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1294309362.3074.11.camel@edumazet-laptop> Organisation: Horms Solutions Ltd. User-Agent: Mutt/1.5.20 (2009-06-14) Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 06 Jan 2011 12:44:55 +0000 (UTC) diff --git a/datapath/actions.c b/datapath/actions.c index 5e16143..505f13f 100644 --- a/datapath/actions.c +++ b/datapath/actions.c @@ -384,7 +384,12 @@ static int do_execute_actions(struct datapath *dp, struct sk_buff *skb, for (a = actions, rem = actions_len; rem > 0; a = nla_next(a, &rem)) { if (prev_port != -1) { - do_output(dp, skb_clone(skb, GFP_ATOMIC), prev_port); + struct sk_buff *nskb = skb_clone(skb, GFP_ATOMIC); + if (nskb) { + if (skb->sk) + skb_set_owner_w(nskb, skb->sk); + do_output(dp, nskb, prev_port); + } prev_port = -1; }