Bug 165959

Summary: NFS/RPC - timestamp conversion is wrong
Product: Red Hat Enterprise Linux 4 Reporter: Steve Dickson <steved>
Component: kernelAssignee: Steve Dickson <steved>
Status: CLOSED ERRATA QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: RHSA-2006-0132 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-03-07 19:34:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 168429    

Description Steve Dickson 2005-08-15 10:34:28 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10) Gecko/20050719 Fedora/1.7.10-1.3.1

Description of problem:
From: Josip Loncaric <josip>

This is obviously wrong:

                 skb->stamp.tv_usec = xtime.tv_nsec * 1000;

To convert nsec to usec, one should divide instead of multiplying:

                 skb->stamp.tv_usec = xtime.tv_nsec / 1000;

Cc: "David S. Miller" <davem>
Cc: Trond Myklebust <trond.myklebust.no>
Cc: Neil Brown <neilb.edu.au>
Signed-off-by: Andrew Morton <akpm>
---

--- linux-2.6.9/net/sunrpc/svcsock.c.save	2004-10-18 17:53:13.000000000 -0400
+++ linux-2.6.9/net/sunrpc/svcsock.c	2005-08-02 10:34:16.155038000 -0400
@@ -587,7 +587,7 @@ svc_udp_recvfrom(struct svc_rqst *rqstp)
 	}
 	if (skb->stamp.tv_sec == 0) {
 		skb->stamp.tv_sec = xtime.tv_sec; 
-		skb->stamp.tv_usec = xtime.tv_nsec * 1000; 
+		skb->stamp.tv_usec = xtime.tv_nsec / 1000; 
 		/* Don't enable netstamp, sunrpc doesn't 
 		   need that much accuracy */
 	}


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Mount an NFS filesystem. 
2.
3.
  

Additional info:

Comment 6 Red Hat Bugzilla 2006-03-07 19:34:25 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2006-0132.html