netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Vrabel <david.vrabel@citrix.com>
To: Annie Li <Annie.li@oracle.com>
Cc: <xen-devel@lists.xen.org>, <netdev@vger.kernel.org>,
	<konrad.wilk@oracle.com>, <ian.campbell@citrix.com>,
	<wei.liu2@citrix.com>
Subject: Re: [Xen-devel] [PATCH net-next v5] xen-netfront: clean up code in xennet_release_rx_bufs
Date: Mon, 27 Jan 2014 10:22:58 +0000	[thread overview]
Message-ID: <52E63382.6090503@citrix.com> (raw)
In-Reply-To: <1390731147-2424-1-git-send-email-Annie.li@oracle.com>

On 26/01/14 10:12, Annie Li wrote:
> From: Annie Li <annie.li@oracle.com>
> 
> This patch removes grant transfer releasing code from netfront, and uses
> gnttab_end_foreign_access to end grant access since
> gnttab_end_foreign_access_ref may fail when the grant entry is
> currently used for reading or writing.
> 
> * clean up grant transfer code kept from old netfront(2.6.18) which grants
> pages for access/map and transfer. But grant transfer is deprecated in current
> netfront, so remove corresponding release code for transfer.
> 
> * release grant access (through gnttab_end_foreign_access) and skb for tx/rx path,
> use get_page to ensure page is released when grant access is completed successfully.
> 
> Xen-blkfront/xen-tpmfront/xen-pcifront also have similar issue, but patches
> for them will be created separately.
> 
> V5: Remove unecessary change in xennet_end_access.
> 
> V4: Revert put_page in gnttab_end_foreign_access, and keep netfront change in
> single patch.
> 
> V3: Changes as suggestion from David Vrabel, ensure pages are not freed untill
> grant acess is ended.
> 
> V2: Improve patch comments.
> 
> Signed-off-by: Annie Li <annie.li@oracle.com>

Reviewed-by: David Vrabel <david.vrabel@citrix.com>

I think this should be applied to net (and tagged as a stable candidate)
rather than net-next as this fixes are very big resource leak.

David

  reply	other threads:[~2014-01-27 10:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-26 10:12 [Xen-devel] [PATCH net-next v5] xen-netfront: clean up code in xennet_release_rx_bufs Annie Li
2014-01-27 10:22 ` David Vrabel [this message]
2014-01-27 21:09   ` David Miller
2014-01-28  3:29     ` annie li

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=52E63382.6090503@citrix.com \
    --to=david.vrabel@citrix.com \
    --cc=Annie.li@oracle.com \
    --cc=ian.campbell@citrix.com \
    --cc=konrad.wilk@oracle.com \
    --cc=netdev@vger.kernel.org \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.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;
as well as URLs for NNTP newsgroup(s).