md: check that internal bitmap does not overlap other data
authorNeilBrown <neilb@suse.de>
Tue, 17 Jul 2007 11:06:12 +0000 (04:06 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 17 Jul 2007 17:23:15 +0000 (10:23 -0700)
commitf0d76d70bc77b9b11256a3a23e98e80878be1578
treeabf9e37302ce587c8c62e430aaf9f004548e653c
parent713f6ab18b0e7d39f14401362bfe8015b1aedde1
md: check that internal bitmap does not overlap other data

We current completely trust user-space to set up metadata describing an
consistant array.  In particlar, that the metadata, data, and bitmap do not
overlap.

But userspace can be buggy, and it is better to report an error than corrupt
data.  So put in some appropriate checks.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/md/bitmap.c
drivers/md/md.c