Red Hat Bugzilla – Bug 177031
device-mapper mirror log: avoid overrun while syncing
Last modified: 2007-11-30 17:07:22 EST
The initial sync performed when creating a mirror can overrun the end of the
mapped sections of the underlying devices, corrupting data that doesn't
belong to device-mapper.
*region = find_next_zero_bit((unsigned long *) lc->sync_bits,
lc->sync_search = *region + 1;
if (*region == lc->region_count)
} while (log_test_bit(lc->recovering_bits, *region));
log_set_bit(lc, lc->recovering_bits, *region);
If every bit up to lc->sync_bits is 1 (easily reproduced by setting
the 'nosync' option which is not supposed to do any syncing) *region gets set
to a value that exceeds lc->region_count and you see 'attempt to access beyond
end of device' errors.
Created attachment 122833 [details]
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.