[PATCH 06/10] scsi_dh: Do not allow arguments for hardware handlers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Subject: [PATCH 06/10] scsi_dh: Do not allow arguments for hardware handlers

From: Chandra Seetharaman <sekharan@xxxxxxxxxx>

The new implementation does not use the arguments provided with the
hardware handler. This patch makes the change visible to the user by
failing table load when arguments are provided with the hardware handler.

Signed-off-by: Chandra Seetharaman <sekharan@xxxxxxxxxx>
---
Index: linux-2.6.25/drivers/md/dm-mpath.c
===================================================================
--- linux-2.6.25.orig/drivers/md/dm-mpath.c
+++ linux-2.6.25/drivers/md/dm-mpath.c
@@ -653,11 +653,15 @@ static int parse_hw_handler(struct arg_s
 	struct dm_target *ti = m->ti;
 
 	static struct param _params[] = {
-		{0, 1024, "invalid number of hardware handler args"},
+		{0, 1, "invalid number of hardware handler args"},
 	};
 
-	if (read_param(_params, shift(as), &hw_argc, &ti->error))
+	if (read_param(_params, shift(as), &hw_argc, &ti->error)) {
+		if (hw_argc > 1)
+			ti->error = "no arguments accepted for hardware"
+					" handler";
 		return -EINVAL;
+	}
 
 	if (!hw_argc)
 		return 0;
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux