When running UML under Valgrind (details to be posted later), I found
that ubd_kern.c:do_io() was accessing uninitialized memory.
Specifically, ubd_test_bit() can be called with the first parameter
greater than 32 and req->sector_mask is only 32bits long. This is only
the case when not using a cow device, as cowify_req() ensures that the
request size is not more than 32 sectors.
Furthermore, when not using a cow device, there is no reason to break
a request into smaller pieces. The attached patch skips the call
to ubd_test_bit() for the non-cow case and completes the request in
a single batch.
Get latest updates about Open Source Projects, Conferences and News.