Problem Description:
Grant mapping operations often occur in batch hypercalls, where a
number of operations are done in a single hypercall, the success or
failure of each one reported to the backend driver, and the backend
driver then loops over the results, performing follow-up actions
based on the success or failure of each operation.
Unfortunately, when running in HVM/PVH mode, the FreeBSD backend
drivers mishandle this: Some errors are ignored, effectively implying
their success from the success of related batch elements. In other
cases, errors resulting from one batch element lead to further batch
elements not being inspected, and hence successful ones to not be
possible to properly unmap upon error recovery.
Impact:
A malicious or buggy frontend driver may be able to cause resource
leaks in the domain running the corresponding backend driver.