xapi-project/blktap — pull request #115 by tmakatos (2014-08-08 12:08:24+00:00)
Title: CA-141740: don't overwrite requests not yet submitted

When submitting requests we use a sub-array of the free requests. This
is problematic because if one request fails (e.g. because the grant-copy
failed while serving a write request) we immediately complete the
request, and completing the requests means that we put it back on the
part of the array designated to hold free requests. However, putting
back the request overwrites part of the sub-array designated to the
not-yet-submitted requests, which leads to corruption.

Operating on a copy of the sub-array of the requests to be submitted
addresses the issue.

Signed-off-by: Thanos Makatos