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

From: Bryan O'Sullivan
Date: Fri May 12 2006 - 20:01:04 EST


Signed-off-by: Bryan O'Sullivan <bos@xxxxxxxxxxxxx>

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;
-
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/