SUNRPC hangs trying to use srcport which is in TIME_WAIT from previous connection.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



To reproduce it just do mount/umount in a loop.
Script and patch (for linux v4.2) are attached.

 Thanks
--Alexey

Attachment: loop.sh
Description: Bourne shell script

diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
index c350385..a71233f 100644
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -2243,6 +2243,7 @@ static void xs_tcp_setup_socket(struct work_struct *work)
 		/* We're probably in TIME_WAIT. Get rid of existing socket,
 		 * and retry
 		 */
+		transport->srcport = 0;
 		xs_tcp_force_close(xprt);
 		break;
 	case 0:

[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux