diff options
author | gibbs <gibbs@FreeBSD.org> | 2009-12-29 23:28:13 +0000 |
---|---|---|
committer | gibbs <gibbs@FreeBSD.org> | 2009-12-29 23:28:13 +0000 |
commit | e1908d0f3d7b981cc76a4bceea780f9c74feb9a3 (patch) | |
tree | 5be79aeaf3fb07551fdc561a324036946a38d097 /sys/xen | |
parent | b9ca89bfc495774b5fe49e23a272c721c840f68b (diff) | |
download | FreeBSD-src-e1908d0f3d7b981cc76a4bceea780f9c74feb9a3.zip FreeBSD-src-e1908d0f3d7b981cc76a4bceea780f9c74feb9a3.tar.gz |
Correct bug introduced while purging the -ERRNO Linuxism from the
grant table API. Valid grant refs are in the range of positive 32bit
integers. ENOSPACE, being 29, is also a positive integer. Return
GNTTAB_LIST_END (-1) instead when gnttab_claim_grant_reference() fails.
Diffstat (limited to 'sys/xen')
-rw-r--r-- | sys/xen/gnttab.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/xen/gnttab.c b/sys/xen/gnttab.c index d05790b..ae44e8f 100644 --- a/sys/xen/gnttab.c +++ b/sys/xen/gnttab.c @@ -325,7 +325,7 @@ gnttab_claim_grant_reference(grant_ref_t *private_head) grant_ref_t g = *private_head; if (unlikely(g == GNTTAB_LIST_END)) - return (ENOSPC); + return (g); *private_head = gnttab_entry(g); return (g); } |