[openib-general] [PATCH 28 of 53] ipath - forbid setting of invalid MLID

Bryan O'Sullivan bos at pathscale.com
Fri May 12 16:43:13 PDT 2006


Signed-off-by: Bryan O'Sullivan <bos at pathscale.com>

diff -r 551966b88d7c -r 47f1df66d097 drivers/infiniband/hw/ipath/ipath_sysfs.c
--- a/drivers/infiniband/hw/ipath/ipath_sysfs.c	Fri May 12 15:55:28 2006 -0700
+++ b/drivers/infiniband/hw/ipath/ipath_sysfs.c	Fri May 12 15:55:28 2006 -0700
@@ -221,7 +221,7 @@ static ssize_t store_mlid(struct device 
 	int ret;
 
 	ret = ipath_parse_ushort(buf, &mlid);
-	if (ret < 0)
+	if (ret < 0 || mlid < 0xc000)
 		goto invalid;
 
 	unit = dd->ipath_unit;



More information about the general mailing list