Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
target: fix truncation of mode data, support zero allocation length
The offset was not bumped back to the full size after writing the header of the MODE SENSE response, so the last 1 or 2 bytes were not copied. On top of this, support zero-length requests by checking for the return value of transport_kmap_data_sg. Testcase: sg_raw -r20 /dev/sdb 5a 00 0a 00 00 00 00 00 14 00 last byte should be 0x1e it is 0x00 without the patch it is correct with the patch Signed-off-by: Paolo Bonzini <[email protected]> Cc: [email protected] Signed-off-by: Nicholas Bellinger <[email protected]>
- Loading branch information