[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[dm-devel] Missing chunk size constraint in dm-stripe
- From: Alasdair G Kergon <agk redhat com>
- To: dm-devel redhat com
- Subject: [dm-devel] Missing chunk size constraint in dm-stripe
- Date: Fri, 21 Jan 2005 15:18:28 +0000
Ensure number of stripe chunks fits into 32 bits.
--- diff/drivers/md/dm-stripe.c 2005-01-21 15:10:13.000000000 +0000
+++ source/drivers/md/dm-stripe.c 2005-01-21 15:09:47.000000000 +0000
@@ -135,6 +135,11 @@
chunk_size >>= 1;
sc->chunk_shift--;
+ if ((sizeof(ti->len) > 4) && (ti->len >> 32 >> sc->chunk_shift)) {
+ ti->error = "dm-stripe: Chunk size too small for stripe";
+ return -EINVAL;
+ }
+
/*
* Get the stripe destinations.
*/
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]