ibacm/acm.c: Make sure shift for subnet timeout is not negative
PATCH 1/1 ibacm/acm.c: Make sure shift for subnet timeout is not negative
in acm_port_up
---
src/acm.c +2 -1
@@ -2794,7 +2794,8 @@ static void acm_port_up(struct acm_port *port) port->mtu = attr.active_mtu; port->rate =acm_get_rate (attr.active_width, attr.active_speed); - port->subnet_timeout =1 << (attr.subnet_timeout -8 ); +if (attr.subnet_timeout >=8 ) + port->subnet_timeout =1 << (attr.subnet_timeout -8 );for (port->gid_cnt =0 ;; port->gid_cnt++) { ret =ibv_query_gid (port->dev->verbs, port->port_num, port->gid_cnt, &gid);if (ret || !gid.global.interface_id)
--
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
thanks! - applied
--
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