[lvm-devel] [PATCH LVM2] Guarantee ah->area_multiple non-zero

Jun'ichi Nomura j-nomura at ce.jp.nec.com
Tue Dec 12 22:53:58 UTC 2006


Hi,

This patch guarantees ah->area_multiple being non-zero.

Since ah->area_multiple is used everywhere to calculate the length
of allocation, it's safer to set 1 if ah->area_count is zero.
Otherwise, zero division could occur.
For example, ah->area_count can be zero when the allocation request
is only for log device.

It should be reproducible by converting corelog mirror to disklog
mirror. But fortunately or unfortunately, this bug is hidden by
other bug.
(See "[PATCH LVM2] set stripes = 0 for the log device only allocation")

Patch applicable to LVM2 2.02.16.

Thanks,
-- 
Jun'ichi Nomura, NEC Corporation of America
-------------- next part --------------
A non-text attachment was scrubbed...
Name: guarantee-area_multiple-non-zero.patch
Type: text/x-patch
Size: 1143 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/lvm-devel/attachments/20061212/3d8158be/attachment.bin>


More information about the lvm-devel mailing list