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

From: Kevin Corry (kevcorry_at_us.ibm.com)
Date: 06/30/04

  • Next message: David S. Miller: "Re: inconsistency between SIOCGIFCONF and SIOCGIFNAME"
    To: Linus Torvalds <torvalds@osdl.org>, Andrew Morton <akpm@osdl.org>
    Date:	Wed, 30 Jun 2004 14:58:27 -0500
    
    

    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@us.ibm.com>

    --- 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@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: David S. Miller: "Re: inconsistency between SIOCGIFCONF and SIOCGIFNAME"

    Relevant Pages