>If next_port is signed int, and is randomized to be negative, it will fail
>accesses to the idr data structure and therefore cause errors in rdma_cm users.
next_port is initialized as follows:
get_random_bytes(&next_port, sizeof next_port);
next_port = (next_port % (sysctl_local_port_range[1] -
sysctl_local_port_range[0])) +
sysctl_local_port_range[0];
Even if next_port is initialized to a negative value by get_random_bytes, I
would expect next_port to be set to a positive value between local_port_range[0]
and local_port_range[1] by the next statement. I'm not seeing the error my my
math/logic here.
- Sean
_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general
To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general