Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 299226 Details for
Bug 438975
gettimeofday is not monotonically increasing
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
Patch that applies cleanly to 4.6
linux-2.6-xen-fix-time-going-backwards-gettimeofday.patch (text/x-patch), 1.58 KB, created by
Don Dutile (Red Hat)
on 2008-03-26 20:41:36 UTC
(
hide
)
Description:
Patch that applies cleanly to 4.6
Filename:
MIME Type:
Creator:
Don Dutile (Red Hat)
Created:
2008-03-26 20:41:36 UTC
Size:
1.58 KB
patch
obsolete
>--- linux-2.6.9/arch/i386/kernel/time-xen.c.orig 2008-03-26 11:20:57.000000000 -0400 >+++ linux-2.6.9/arch/i386/kernel/time-xen.c 2008-03-26 11:47:07.000000000 -0400 >@@ -121,6 +121,9 @@ static DEFINE_PER_CPU(struct shadow_time > static struct timespec shadow_tv; > static u32 shadow_tv_version; > >+static struct timeval monotonic_tv; >+static spinlock_t monotonic_lock = SPIN_LOCK_UNLOCKED; >+ > /* Keep track of last time we did processing/updating of jiffies and xtime. */ > static u64 processed_system_time; /* System time (ns) at last processing. */ > static DEFINE_PER_CPU(u64, processed_system_time); >@@ -354,6 +357,7 @@ void do_gettimeofday(struct timeval *tv) > unsigned long seq; > unsigned long usec, sec; > unsigned long max_ntp_tick; >+ unsigned long flags; > s64 nsec; > unsigned int cpu; > struct shadow_time_info *shadow; >@@ -414,6 +418,17 @@ void do_gettimeofday(struct timeval *tv) > sec++; > } > >+ spin_lock_irqsave(&monotonic_lock, flags); >+ if ((sec > monotonic_tv.tv_sec) || >+ ((sec == monotonic_tv.tv_sec) && (usec > monotonic_tv.tv_usec))) { >+ monotonic_tv.tv_sec = sec; >+ monotonic_tv.tv_usec = usec; >+ } else { >+ sec = monotonic_tv.tv_sec; >+ usec = monotonic_tv.tv_usec; >+ } >+ spin_unlock_irqrestore(&monotonic_lock, flags); >+ > tv->tv_sec = sec; > tv->tv_usec = usec; > } >@@ -463,6 +478,12 @@ int do_settimeofday(struct timespec *tv) > __update_wallclock(sec, nsec); > } > >+ /* Reset monotonic gettimeofday() timeval. */ >+ spin_lock(&monotonic_lock); >+ monotonic_tv.tv_sec = 0; >+ monotonic_tv.tv_usec = 0; >+ spin_unlock(&monotonic_lock); >+ > write_sequnlock_irq(&xtime_lock); > > put_cpu();
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 438975
:
299179
|
299181
|
299213
|
299225
| 299226