From: David Vrabel Date: Tue, 2 Sep 2014 14:21:29 +0000 (+0100) Subject: xen/gntalloc: fix oops after runnning out of grant refs X-Git-Tag: fixes-for-v3.18-merge-window~146^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e9de2e5fd602c4f5ddf212d3837b19ad4f5878ad;p=pandora-kernel.git 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 Reported-by: Dave Scott Reviewed-by: Boris Ostrovsky --- Reading git-diff-tree failed