[PATCH] 3/4: DM: dm-raid1.c: Enforce max of 9 mirrors

From: Kevin Corry
Date: Wed Jun 30 2004 - 15:05:01 EST


dm-raid1.c: Since kcopyd can currently only handle 1 source and up to 8
destinations, enforce a max of 9 mirrors when creating a dm-mirror device.

Signed-off-by: Kevin Corry <kevcorry@xxxxxxxxxx>

--- diff/drivers/md/dm-raid1.c 2004-06-30 08:45:34.500305424 -0500
+++ source/drivers/md/dm-raid1.c 2004-06-30 08:48:25.247347928 -0500
@@ -1028,7 +1028,7 @@
argc -= args_used;

if (!argc || sscanf(argv[0], "%u", &nr_mirrors) != 1 ||
- nr_mirrors < 2) {
+ nr_mirrors < 2 || nr_mirrors > KCOPYD_MAX_REGIONS + 1) {
ti->error = "dm-mirror: Invalid number of mirrors";
dm_destroy_dirty_log(dl);
return -EINVAL;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/