Annie Li cefe0078ee xen-netfront: fix resource leak in netfront
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.

* fix resource leak, 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.

V6: Correct subject line and commit message.

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>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-27 19:48:45 -08:00
..
2014-01-25 13:18:00 -08:00
2014-01-23 18:45:38 -08:00
2014-01-23 18:49:36 -08:00
2014-01-23 18:36:55 -08:00
2014-01-23 18:45:38 -08:00
2014-01-23 18:49:36 -08:00
2014-01-25 10:49:30 -08:00
2014-01-24 17:41:50 -08:00
2014-01-25 13:19:10 -08:00
2014-01-26 11:00:41 -08:00
2014-01-23 18:45:38 -08:00
2014-01-12 23:48:18 +01:00
2014-01-15 14:51:22 -08:00
2014-01-21 08:28:00 +00:00
2014-01-25 13:19:10 -08:00
2014-01-25 13:20:36 -08:00
2014-01-23 18:49:36 -08:00
2013-12-20 08:49:17 -08:00
2014-01-24 17:16:31 -08:00
2014-01-22 22:24:35 -08:00
2014-01-23 18:49:36 -08:00