Ross Lagerwall 3ac7292a25 xen/grant-table: Use put_page instead of free_page
The page given to gnttab_end_foreign_access() to free could be a
compound page so use put_page() instead of free_page() since it can
handle both compound and single pages correctly.

This bug was discovered when migrating a Xen VM with several VIFs and
CONFIG_DEBUG_VM enabled. It hits a BUG usually after fewer than 10
iterations. All netfront devices disconnect from the backend during a
suspend/resume and this will call gnttab_end_foreign_access() if a
netfront queue has an outstanding skb. The mismatch between calling
get_page() and free_page() on a compound page causes a reference
counting error which is detected when DEBUG_VM is enabled.

Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Juergen Gross <jgross@suse.com>
2018-02-06 09:55:37 +01:00
..
2015-12-21 14:40:55 +00:00
2017-05-02 12:06:50 +02:00
2017-12-12 09:39:43 -05:00
2017-11-16 13:06:27 -08:00
2015-12-21 14:40:55 +00:00
2017-11-16 13:06:27 -08:00
2017-06-05 16:59:12 +02:00