Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 85322947 authored by Bryan O'Sullivan's avatar Bryan O'Sullivan Committed by Linus Torvalds
Browse files

[PATCH] IB/ipath: check for valid LID and multicast LIDs



Signed-off-by: default avatarRalph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: default avatarBryan O'Sullivan <bryan.osullivan@qlogic.com>
Cc: "Michael S. Tsirkin" <mst@mellanox.co.il>
Cc: Roland Dreier <rolandd@cisco.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 7cd658cd
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -280,7 +280,7 @@ static ssize_t store_lid(struct device *dev,
	if (ret < 0)
		goto invalid;

	if (lid == 0 || lid >= 0xc000) {
	if (lid == 0 || lid >= IPS_MULTICAST_LID_BASE) {
		ret = -EINVAL;
		goto invalid;
	}
@@ -314,7 +314,7 @@ static ssize_t store_mlid(struct device *dev,
	int ret;

	ret = ipath_parse_ushort(buf, &mlid);
	if (ret < 0)
	if (ret < 0 || mlid < IPS_MULTICAST_LID_BASE)
		goto invalid;

	unit = dd->ipath_unit;