From: David Vrabel <david.vrabel@citrix.com>
To: Annie Li <Annie.li@oracle.com>
Cc: <xen-devel@lists.xen.org>, <netdev@vger.kernel.org>,
<davem@davemloft.net>, <konrad.wilk@oracle.com>,
<ian.campbell@citrix.com>, <wei.liu2@citrix.com>,
<andrew.bennieston@citrix.com>
Subject: Re: [Xen-devel][PATCH net-next v2] xen-netfront: clean up code in xennet_release_rx_bufs
Date: Thu, 16 Jan 2014 11:10:17 +0000 [thread overview]
Message-ID: <52D7BE19.2010009@citrix.com> (raw)
In-Reply-To: <1389830228-2381-1-git-send-email-Annie.li@oracle.com>
On 15/01/14 23:57, Annie Li wrote:
> This patch implements two things:
>
> * release grant reference and skb for rx path, this fixex resource leaking.
> * 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.
>
> gnttab_end_foreign_access_ref may fail when the grant entry is currently used
> for reading or writing. But this patch does not cover this and improvement for
> this failure may be implemented in a separate patch.
I don't think replacing a resource leak with a security bug is a good idea.
If you would prefer not to fix the gnttab_end_foreign_access() call, I
think you can fix this in netfront by taking a reference to the page
before calling gnttab_end_foreign_access(). This will ensure the page
isn't freed until the subsequent kfree_skb(), or the gref is released by
the foreign domain (whichever is later).
David
next prev parent reply other threads:[~2014-01-16 11:10 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-15 23:57 [Xen-devel][PATCH net-next v2] xen-netfront: clean up code in xennet_release_rx_bufs Annie Li
2014-01-16 11:10 ` [PATCH " David Vrabel
2014-01-16 11:10 ` David Vrabel [this message]
2014-01-16 13:42 ` [Xen-devel][PATCH " annie li
2014-01-17 1:25 ` David Miller
2014-01-17 1:25 ` [PATCH " David Miller
2014-01-16 13:42 ` annie li
2014-01-17 6:25 ` annie li
2014-01-17 6:25 ` [Xen-devel] " annie li
2014-01-17 6:58 ` annie li
2014-01-17 6:58 ` [Xen-devel] " annie li
2014-01-17 12:08 ` Wei Liu
2014-01-17 12:08 ` [Xen-devel] " Wei Liu
2014-01-17 12:32 ` annie li
2014-01-17 14:02 ` Wei Liu
2014-01-17 15:43 ` annie li
2014-01-17 15:43 ` [Xen-devel] " annie li
2014-01-17 17:50 ` David Vrabel
2014-01-17 17:50 ` [Xen-devel] " David Vrabel
2014-01-20 2:33 ` annie li
2014-01-20 2:33 ` annie li
2014-01-17 14:02 ` Wei Liu
2014-01-17 12:32 ` annie li
2014-01-17 15:40 ` [Xen-devel] " David Vrabel
2014-01-17 15:40 ` David Vrabel
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=52D7BE19.2010009@citrix.com \
--to=david.vrabel@citrix.com \
--cc=Annie.li@oracle.com \
--cc=andrew.bennieston@citrix.com \
--cc=davem@davemloft.net \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.