Commit 5aee405c662ca644980c184774277fc6d0769a84

Authored by Atsushi Nemoto
Committed by Linus Torvalds
1 parent a615fa8395

[PATCH] time: add barrier after updating jiffies_64

Add a compiler barrier so that we don't read jiffies before updating
jiffies_64.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

Showing 1 changed file with 2 additions and 0 deletions Side-by-side Diff

... ... @@ -941,6 +941,8 @@
941 941 void do_timer(struct pt_regs *regs)
942 942 {
943 943 jiffies_64++;
  944 + /* prevent loading jiffies before storing new jiffies_64 value. */
  945 + barrier();
944 946 update_times();
945 947 softlockup_tick(regs);
946 948 }