]> git.baikalelectronics.ru Git - kernel.git/commit
dm raid: add component device size checks to avoid runtime failure
authorHeinz Mauelshagen <heinzm@redhat.com>
Sat, 2 Dec 2017 00:03:59 +0000 (01:03 +0100)
committerMike Snitzer <snitzer@redhat.com>
Fri, 8 Dec 2017 15:59:57 +0000 (10:59 -0500)
commitba4a27b855a72d6fe155002736600214699d3572
treed6901e4be9de3cbf7a079c40cf823373482c6ef7
parentdf08a7a3344b9b0b00721f9e87d2e9fe4a8934e6
dm raid: add component device size checks to avoid runtime failure

Check all component data device sizes versus calculated size.
Reject if device(s) are too small.  Otherwise, MD will fail the
operation by accessing beyond the end of the data device.

An example use-case is that growing bitmap won't fit any more and the MD
runtime will report an error when DM raid should catch this earlier.

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