mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-28 13:22:48 +00:00
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.
This commit is contained in:
parent
10bc3a7f42
commit
88dd7ba72b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=201234
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user