]> git.ipfire.org Git - thirdparty/mdadm.git/commit
Grow: fix resize of array component size to > 32bits
authorJustin Maggard <jmaggard10@gmail.com>
Sat, 25 Oct 2014 00:55:02 +0000 (17:55 -0700)
committerNeilBrown <neilb@suse.de>
Wed, 29 Oct 2014 00:03:09 +0000 (11:03 +1100)
commit0448027b765ec7ede580a1630c23fe7cf4bd0b05
tree11f9bb9892c934b6a30a8c5e3c213e3e41bfadc5
parentda5a36fa1f0ae8c47075d696d14309c74fd350dc
Grow: fix resize of array component size to > 32bits

If the request --size to --grow an array to is larger
than 32bits, then mdadm may make the wrong choice and
use ioctl instead of setting component_size via sysfs
and the change is ignored.

Instead of using casts to check for a 32-bit overflow,
just check for set bits outside of INT32_MAX.

Fixes: 4e9a3dd16d656b269f5602624ac4f7109a571368
Signed-off-by: NeilBrown <neilb@suse.de>
Grow.c