osm_sa_guidinfo_record.c: Fix crash when receiving AGUID SET/DELETE with block_num equal to max_block
PATCH 1/1 osm_sa_guidinfo_record.c: Fix crash when receiving AGUID SET/DELETE with block_num equal to max_block
From: Vladimir Koushnir <vladimirk-VPRAkNaXOzVWk0Htik3J/[email protected]>
--- opensm/osm_sa_guidinfo_record.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
opensm/osm_sa_guidinfo_record.c +2 -2
@@ -396,7 +396,7 @@ static void del_guidinfo(IN osm_sa_t *sa, IN osm_madw_t *p_madw, max_block = (p_port->p_physp->port_info.guid_cap +GUID_TABLE_MAX_ENTRIES -1 ) /GUID_TABLE_MAX_ENTRIES ; -if (block_num > max_block) { +if (block_num >= max_block) { OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 5116: " "block_num %d is higher than Max GUID Cap block %d " "for port GUID 0x%" PRIx64 "\n",
@@ -503,7 +503,7 @@ static void set_guidinfo(IN osm_sa_t *sa, IN osm_madw_t *p_madw, max_block = (p_port->p_physp->port_info.guid_cap +GUID_TABLE_MAX_ENTRIES -1 ) /GUID_TABLE_MAX_ENTRIES ; -if (block_num > max_block) { +if (block_num >= max_block) { OSM_LOG(sa->p_log, OSM_LOG_ERROR, "ERR 5118: " "block_num %d is higher than Max GUID Cap block %d " "for port GUID 0x%" PRIx64 "\n",
Signature · 6 lines
1.7.8.2 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html