The range calculation for choosing the random reserved port will panic with divide-by-zero when min_resvport == max_resvport, a range of one port, not zero. In addition, the sysctl and kernel module parameters only limit the min_resvport and max_resvport values to the entire range of allowed ports, so the min and max may become inverted, with max_resvport set to a value lower than min_resvport. These patches address both issues by correcting the port range calculation and setting the min_resvport/max_resvport limits to be dependent on each other. Signed-off-by: Frank Sorenson <sorenson@xxxxxxxxxx> [PATCH 1/3] sunrpc: Fix reserved port range calculation [PATCH 2/3] sunrpc: Prevent resvport min/max inversion via sysctl [PATCH 3/3] sunrpc: Prevent resvport min/max inversion via sysfs and -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html