]> git.ipfire.org Git - thirdparty/mdadm.git/commit
super1: Clear memory allocated for superblock + bitmap before use
authorJes Sorensen <Jes.Sorensen@redhat.com>
Wed, 6 Apr 2016 20:13:59 +0000 (16:13 -0400)
committerJes Sorensen <Jes.Sorensen@redhat.com>
Wed, 6 Apr 2016 20:13:59 +0000 (16:13 -0400)
commit1dcee1c9cbcf9592275914706b76b1931490092c
tree755023a2b6bf82c1db13c7e1a54abcdf88a064f4
parent95b55f18751f0d04adaec7fdddd9ccbe8cce5b18
super1: Clear memory allocated for superblock + bitmap before use

load_super1() did not clear memory allocated for the superblock +
bitmap. This causes issues if the superblock does not contain a bitmap
as later checks of bitmap features would rely on the bits being
cleared.

This bug has been around for a long time, but was only exposed in
mdadm-3.4 with the introduction of the clustering code.

Reported-by: Jan Stodola <jstodola@redhat.com>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
super1.c