Bug 165959 - NFS/RPC - timestamp conversion is wrong
NFS/RPC - timestamp conversion is wrong
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel (Show other bugs)
4.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Steve Dickson
Brian Brock
:
Depends On:
Blocks: 168429
  Show dependency treegraph
 
Reported: 2005-08-15 06:34 EDT by Steve Dickson
Modified: 2007-11-30 17:07 EST (History)
0 users

See Also:
Fixed In Version: RHSA-2006-0132
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-03-07 14:34:24 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Steve Dickson 2005-08-15 06:34:28 EDT
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@lanl.gov>

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@davemloft.net>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: Neil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

--- 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 14:34:25 EST
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

Note You need to log in before you can comment on or make changes to this bug.