David Vrabel e9de2e5fd6 xen/gntalloc: fix oops after runnning out of grant refs
Only set gref->gref_id if foreign access was successfully granted and
the grant ref is valid.

If gref->gref_id == -ENOSPC the test in __del_gref() would incorrectly
attempt to end foreign access (because grant_ref_t is unsigned).

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Reported-by: Dave Scott <dave.scott@citrix.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
2014-09-04 13:13:13 +01:00
..
2013-06-28 11:19:58 -04:00
2014-07-18 21:23:58 +01:00
2008-12-16 21:50:31 +01:00
2014-07-18 21:23:58 +01:00
2014-07-18 21:23:58 +01:00
2013-06-28 11:19:58 -04:00
2014-01-06 10:07:30 -05:00
2011-12-16 13:29:31 -05:00
2013-07-03 13:12:42 -07:00