Subject: kern/33740: mount_smbfs fails after timecounter change
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <mlelstv@serpens.de>
List: netbsd-bugs
Date: 06/15/2006 15:10:00
>Number:         33740
>Category:       kern
>Synopsis:       mount_smbfs fails after timecounter change
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jun 15 15:10:00 +0000 2006
>Originator:     Michael van Elst
>Release:        NetBSD 3.99.21
>Organization:
	
>Environment:
	
	
System: NetBSD pussyfoot 3.99.21 NetBSD 3.99.21 (PUSSYFOOT) #34: Thu Jun 15 16:54:53 MEST 2006 src@pussyfoot:/home/obj/sys/arch/i386/compile/PUSSYFOOT i386
Architecture: i386
Machine: i386
>Description:
mount_smbfs fails always because of 'Connection timed out'.

This is caused by an adaption of the function nbsssn_rselect()
for timecounters. The adaption spares a timer calculation but
fails to change a subsequent use of the same calculated tim value.

>How-To-Repeat:
mount_smbfs -U someuser //server/share /mnt

>Fix:

Index: netsmb/smb_trantcp.c
===================================================================
RCS file: /cvsroot/src/sys/netsmb/smb_trantcp.c,v
retrieving revision 1.23
diff -u -r1.23 smb_trantcp.c
--- netsmb/smb_trantcp.c	7 Jun 2006 22:34:17 -0000	1.23
+++ netsmb/smb_trantcp.c	15 Jun 2006 15:01:18 -0000
@@ -180,7 +180,7 @@
 		/*
 		 * We have to recalculate the timeout on every retry.
 		 */
-		timo = hzto(&atv);
+		timo = tvtohz(&atv);
 		if (timo <= 0) {
 			error = EWOULDBLOCK;
 			goto done;


>Unformatted: