The patch titled ipv4: kernel panic when only one unsecured port available has been removed from the -mm tree. Its filename was ipv4-kernel-panic-when-only-one-unsecured-port-available.patch This patch was dropped because it is obsolete ------------------------------------------------------ Subject: ipv4: kernel panic when only one unsecured port available From: Anton Arapov <aarapov@xxxxxxxxxx> Steps to reproduce: Server: [root@server ~]# cat /etc/exports /export *(ro,insecure) // there is insecure ... I am using ports like "1024 to 61000" [root@server ~] service nfs restart Client: 1.[root@client ~]# echo 32768 32768 > /proc/sys/net/ipv4/ip_local_port_range 32768 32768 // two same numbers, for ex "32769 32769" etc. 2.[root@client ~]# cat /proc/sys/net/ipv4/ip_local_port_range 32768 32768 3.[root@client ~]# mount server:/export /import Actual results: Kernel always panics Patch prevents division by zero. Kernel panics if only one unsecured port available. Signed-off-by: Anton Arapov <aarapov@xxxxxxxxxx> Cc: "David S. Miller" <davem@xxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- net/ipv4/inet_connection_sock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN net/ipv4/inet_connection_sock.c~ipv4-kernel-panic-when-only-one-unsecured-port-available net/ipv4/inet_connection_sock.c --- a/net/ipv4/inet_connection_sock.c~ipv4-kernel-panic-when-only-one-unsecured-port-available +++ a/net/ipv4/inet_connection_sock.c @@ -93,7 +93,7 @@ int inet_csk_get_port(struct inet_hashin int remaining, rover, low, high; inet_get_local_port_range(&low, &high); - remaining = high - low; + remaining = high - low + 1; rover = net_random() % remaining + low; do { _ Patches currently in -mm which might be from aarapov@xxxxxxxxxx are ipv4-kernel-panic-when-only-one-unsecured-port-available.patch dont-truncate-proc-pid-environ-at-4096-characters.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html