Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 62226
b: refs/heads/master
c: 2008220
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Jul 20, 2007
1 parent 9dc92f7 commit 186b1ac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1d4ec7b1d6f130818f9b62dea3411d9ee2ff6ff6
refs/heads/master: 2008220879af095d00ca27eb168a55c8595fbc0b
13 changes: 5 additions & 8 deletions trunk/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,14 @@ EXPORT_SYMBOL(sys_tz);
*/
asmlinkage long sys_time(time_t __user * tloc)
{
/*
* We read xtime.tv_sec atomically - it's updated
* atomically by update_wall_time(), so no need to
* even read-lock the xtime seqlock:
*/
time_t i = xtime.tv_sec;
time_t i;
struct timespec tv;

smp_rmb(); /* sys_time() results are coherent */
getnstimeofday(&tv);
i = tv.tv_sec;

if (tloc) {
if (put_user(i, tloc))
if (put_user(i,tloc))
i = -EFAULT;
}
return i;
Expand Down

0 comments on commit 186b1ac

Please sign in to comment.