]> git.ipfire.org Git - thirdparty/mdadm.git/commit - super1.c
super1: only set clustered flag when bitmap is present
authorNeilBrown <neilb@suse.com>
Fri, 4 Aug 2017 05:30:02 +0000 (15:30 +1000)
committerJes Sorensen <jsorensen@fb.com>
Wed, 16 Aug 2017 12:25:07 +0000 (08:25 -0400)
commit6438c249c4fed92cf6e5fb492d19f4c4f516ff6f
treefb6af6ee9f65700e96efb82c16c122f5b14b336c
parentceb5f8ef92c97d1f44c75a3b74f64aa12a3303ef
super1: only set clustered flag when bitmap is present

If no bitmap is present, then the test

if (__le32_to_cpu(bsb->nodes) > 1)

accesses uninitialised memory.  So move that test inside
a test for a bitmap being present.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Jes Sorensen <jsorensen@fb.com>
super1.c