[dm-devel] dm-stripe.c data corruption

bart brooks bart_brooks at hotmail.com
Mon Jun 5 15:41:25 UTC 2006


In RHEL 4 U3 there’s a bug in dm-stripe.c, in the function stripe_map() 
which will result in data corruption.

The call to the macro below will step on the variable chunk, which is used 
later on in the function.
uint32_t stripe = do_div(chunk, sc->stripes);

The following is a very simple solution:

sector_t chunk2 = chunk;
uint32_t stripe = do_div(chunk2, sc->stripes);

Bart





More information about the dm-devel mailing list