mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paul Durrant <Paul.Durrant@citrix.com>
To: Igor Druzhinin <igor.druzhinin@citrix.com>,
	Wei Liu <wei.liu2@citrix.com>
Cc: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"davem@davemloft.net" <davem@davemloft.net>
Subject: RE: [PATCH] xen-netback: fix occasional leak of grant ref mappings under memory pressure
Date: Thu, 28 Feb 2019 11:49:15 +0000	[thread overview]
Message-ID: <271c9beb91a74ded8e62d1cfc540976c@AMSPEX02CL02.citrite.net> (raw)
In-Reply-To: <447cd231-3ea4-e56d-29b0-6528804c9e9a@citrix.com>

> -----Original Message-----
> From: Igor Druzhinin [mailto:igor.druzhinin@citrix.com]
> Sent: 28 February 2019 11:44
> To: Paul Durrant <Paul.Durrant@citrix.com>; Wei Liu <wei.liu2@citrix.com>
> Cc: xen-devel@lists.xenproject.org; netdev@vger.kernel.org; linux-kernel@vger.kernel.org;
> davem@davemloft.net
> Subject: Re: [PATCH] xen-netback: fix occasional leak of grant ref mappings under memory pressure
> 
> On 28/02/2019 11:21, Paul Durrant wrote:
> >>> @@ -1153,6 +1152,10 @@ static int xenvif_tx_submit(struct xenvif_queue *queue)
> >>>                                 kfree_skb(skb);
> >>>                                 continue;
> >>>                         }
> >>> +
> >>> +                       /* Copied all the bits from the frag list. */
> >>> +                       skb_frag_list_init(skb);
> >>> +                       kfree(nskb);
> >>
> >> I think you want kfree_skb here?
> >
> > No. nskb is the frag list... it is unlinked from skb by the call to skb_frag_list_init() and then it
> can be freed on its own. The skb is what we need to retain, because that now contains all the data.
> >
> 
> Are you saying previous code in xenvif_handle_frag_list() incorrectly
> called kfree_skb()?

No, it correctly called kfree_skb() on nskb in the success case. What Wei and myself would prefer is that we have a single place that the frag list is freed in both the success and error cases.

  Paul

> 
> Igor

  reply	other threads:[~2019-02-28 11:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-28  2:03 Igor Druzhinin
2019-02-28  9:46 ` Paul Durrant
2019-02-28 11:01   ` Wei Liu
2019-02-28 11:21     ` Paul Durrant
2019-02-28 11:43       ` Igor Druzhinin
2019-02-28 11:49         ` Paul Durrant [this message]
2019-02-28 12:07       ` Paul Durrant
2019-02-28 12:37         ` Wei Liu
2019-02-28  9:50 ` [Xen-devel] " Andrew Cooper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=271c9beb91a74ded8e62d1cfc540976c@AMSPEX02CL02.citrite.net \
    --to=paul.durrant@citrix.com \
    --cc=davem@davemloft.net \
    --cc=igor.druzhinin@citrix.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®