]> git.baikalelectronics.ru Git - kernel.git/commit
dm raid: fix inaccessible superblocks causing oops in configure_discard_support
authorHeinz Mauelshagen <heinzm@redhat.com>
Wed, 29 Oct 2014 18:02:27 +0000 (19:02 +0100)
committerMike Snitzer <snitzer@redhat.com>
Wed, 29 Oct 2014 18:53:27 +0000 (14:53 -0400)
commit5f95c862fa968b21ebf3dc46368c143dec6ef024
tree82de1747b623d3d37a59b07762fd473c0c2501e6
parent6d6c01ebe2e30e0851847972bdd057fa1682c3f5
dm raid: fix inaccessible superblocks causing oops in configure_discard_support

Commit 53c39604d3 ("dm raid: add discard support for RAID levels 4, 5
and 6") did not properly handle missing metadata device(s).  A failing
read of the superblock causes the metadata and data devices to be
removed from the dev array in struct raid_set, setting references to
both devices to NULL.  configure_discard_support() nonetheless tries to
access the data dev unconditionally causing an oops.

Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-raid.c