From mboxrd@z Thu Jan 1 00:00:00 1970 From: Willem de Bruijn Subject: [PATCH net 0/2] zerocopy fixes Date: Wed, 20 Dec 2017 17:37:48 -0500 Message-ID: <20171220223750.27795-1-willemdebruijn.kernel@gmail.com> Cc: davem@davemloft.net, Willem de Bruijn To: netdev@vger.kernel.org Return-path: Received: from mail-yw0-f177.google.com ([209.85.161.177]:34953 "EHLO mail-yw0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756189AbdLTWhy (ORCPT ); Wed, 20 Dec 2017 17:37:54 -0500 Received: by mail-yw0-f177.google.com with SMTP id v187so2300577ywc.2 for ; Wed, 20 Dec 2017 14:37:53 -0800 (PST) Sender: netdev-owner@vger.kernel.org List-ID: From: Willem de Bruijn The removal of UFO hardware offload support exposed a bug in segmentation of zerocopy skbs. The reference counting mechanism for msg_zerocopy was incorrectly applied to vhost_net zerocopy packets. The other issue observed through analysis. We do not cook skbs with skb_zcopy(skb) but no frags, but this is possible in principle. Correctly call skb_zcopy_clear on those. Willem de Bruijn (2): skbuff: orphan frags before zerocopy clone skbuff: skb_copy_ubufs must release uarg even without user frags net/core/skbuff.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) -- 2.15.1.620.gb9897f4670-goog