mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: LKML <linux-kernel@vger.kernel.org>
Cc: John Stultz <john.stultz@linaro.org>, Ingo Molnar <mingo@elte.hu>,
	Peter Anvin <hpa@zytor.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Tony Luck <tony.luck@intel.com>
Subject: [patch 2/4] x86: vdso: Remove bogus locking in update_vsyscall_tz()
Date: Tue, 28 Feb 2012 19:46:04 -0000	[thread overview]
Message-ID: <20120228194508.498147421@linutronix.de> (raw)
In-Reply-To: <20120228194200.180923135@linutronix.de>

[-- Attachment #1: x86-vdso-remove-bogus-locking-in-update_vsyscall_tz.patch --]
[-- Type: text/plain, Size: 946 bytes --]

Changing the sequence count in update_vsyscall_tz() is completely
pointless. 

The vdso code copies the data unprotected. There is no point to change
this as sys_tz is nowhere protected at all. See sys_gettimeofday().

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 arch/x86/kernel/vsyscall_64.c |    5 -----
 1 file changed, 5 deletions(-)

Index: linux-2.6/arch/x86/kernel/vsyscall_64.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/vsyscall_64.c
+++ linux-2.6/arch/x86/kernel/vsyscall_64.c
@@ -80,12 +80,7 @@ early_param("vsyscall", vsyscall_setup);
 
 void update_vsyscall_tz(void)
 {
-	unsigned long flags;
-
-	write_seqlock_irqsave(&vsyscall_gtod_data.lock, flags);
-	/* sys_tz has changed */
 	vsyscall_gtod_data.sys_tz = sys_tz;
-	write_sequnlock_irqrestore(&vsyscall_gtod_data.lock, flags);
 }
 
 void update_vsyscall(struct timespec *wall_time, struct timespec *wtm,



  parent reply	other threads:[~2012-02-28 19:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-28 19:46 [patch 0/4] time/timekeeping: Simplify vsyscall locking Thomas Gleixner
2012-02-28 19:46 ` [patch 1/4] time: Remove bogus comments Thomas Gleixner
2012-02-28 19:46 ` [patch 3/4] x86: vdso: Use seqcount instead of seqlock Thomas Gleixner
2012-02-28 19:46 ` Thomas Gleixner [this message]
2012-02-28 19:46 ` [patch 4/4] ia64: vsyscall: " Thomas Gleixner
2012-03-26 23:04   ` Tony Luck
2012-03-27 13:05     ` Thomas Gleixner
2012-02-29 20:07 ` [patch 0/4] time/timekeeping: Simplify vsyscall locking Andy Lutomirski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120228194508.498147421@linutronix.de \
    --to=tglx@linutronix.de \
    --cc=hpa@zytor.com \
    --cc=john.stultz@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=tony.luck@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®