]> git.ipfire.org Git - thirdparty/mdadm.git/commit - util.c
Check all member devices in enough_fd
authorNeilBrown <neilb@suse.de>
Mon, 23 May 2011 07:21:35 +0000 (17:21 +1000)
committerNeilBrown <neilb@suse.de>
Mon, 23 May 2011 07:21:35 +0000 (17:21 +1000)
commit9e6d9291275267d3fd4b6d85d7232081f89cd8e2
tree2536ecb26b6fd0ad3d9c311d58f475b3c524c988
parentf4db7a6f3c3b9a0701f3063b287b7cb59ccecd07
Check all member devices in enough_fd

The loop over all member devices in enough_fd could easily stop
before it had found all devices.  This would cause --re-add to
fail incorrectly.

So change the loop to be based on the reported number of devices
in the device - with a safe-guard limit of 1024.

Change some other loops to be more careful too.

Reported-by: "Schmidt, Annemarie" <Annemarie.Schmidt@stratus.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Manage.c
Monitor.c
util.c