From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Graf Subject: Re: [PATCH v2] core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors Date: Thu, 20 Mar 2014 13:33:20 +0100 Message-ID: <532AE010.9050903@redhat.com> References: <1395263249-16450-1-git-send-email-zoltan.kiss@citrix.com> <532ADC33.5040607@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Cc: netfilter-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Miklos Szeredi , kvm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, "Michael S. Tsirkin" , Jason Wang , Eric Dumazet , Jan Beulich , Tom Herbert , Herbert Xu , Jozsef Kadlecsik , xen-devel-GuqFBffKawtpuQazS67q72D2FQJk+8+b@public.gmane.org, Pablo Neira Ayuso , Jiri Pirko , Paul Durrant , netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Florian Westphal , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Daniel Borkmann , netfilter-devel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Joe Perches , "David S. Miller" To: Zoltan Kiss , Jesse Gross , pshelar-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org, dev-yBygre7rU0TnMu66kgdUjQ@public.gmane.org Return-path: In-Reply-To: <532ADC33.5040607-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-yBygre7rU0TnMu66kgdUjQ@public.gmane.org Sender: "dev" List-Id: netfilter-devel.vger.kernel.org On 03/20/2014 01:16 PM, Thomas Graf wrote: > On 03/19/2014 10:07 PM, Zoltan Kiss wrote: >> skb_zerocopy can copy elements of the frags array between skbs, but it >> doesn't >> orphan them. Also, it doesn't handle errors, so this patch takes care >> of that >> as well. >> >> Signed-off-by: Zoltan Kiss > > Acked-by: Thomas Graf I take this back ;) >> --- >> + if (unlikely(skb_orphan_frags(to, GFP_ATOMIC))) { >> + skb_tx_error(to); >> + return -ENOMEM; >> + } Just noticed that you orphan the Netlink skb frags which do not exist yet instead of the source skb frags. > Did you consider calling skb_tx_error() for Netlink message > allocation failures for the upcall as well? That memory pressure > is currently not reported back.