diff options
| author | Will Deacon <will.deacon@arm.com> | 2013-01-07 11:12:31 -0500 |
|---|---|---|
| committer | Catalin Marinas <catalin.marinas@arm.com> | 2013-01-10 05:43:43 -0500 |
| commit | bdba0051ebcb3c6372f9cc0b2524c47cc6ce46fd (patch) | |
| tree | 38efe063fe3fc5516e3a372a5d7908a9a5f2bf5d | |
| parent | 9931faca02c604c22335f5a935a501bb2ace6e20 (diff) | |
arm64: vdso: remove broken, redundant sequence counting for timezones
This patch is an arm64 version of ce73ec6db47a ("powerpc/vdso: Remove
redundant locking in update_vsyscall_tz()").
Timezone data is not protected, so the sequence counter is not required
to ensure consistency. Furthermore, having multiple paths updating the
counter leads to a race between update_vsyscall and update_vsyscall_tz,
so remove the timezone sequence counting from both the kernel and the
vdso.
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
| -rw-r--r-- | arch/arm64/kernel/vdso.c | 4 | ||||
| -rw-r--r-- | arch/arm64/kernel/vdso/gettimeofday.S | 2 |
2 files changed, 0 insertions, 6 deletions
diff --git a/arch/arm64/kernel/vdso.c b/arch/arm64/kernel/vdso.c index c958cb84d75f..6a389dc1bd49 100644 --- a/arch/arm64/kernel/vdso.c +++ b/arch/arm64/kernel/vdso.c | |||
| @@ -252,10 +252,6 @@ void update_vsyscall(struct timekeeper *tk) | |||
| 252 | 252 | ||
| 253 | void update_vsyscall_tz(void) | 253 | void update_vsyscall_tz(void) |
| 254 | { | 254 | { |
| 255 | ++vdso_data->tb_seq_count; | ||
| 256 | smp_wmb(); | ||
| 257 | vdso_data->tz_minuteswest = sys_tz.tz_minuteswest; | 255 | vdso_data->tz_minuteswest = sys_tz.tz_minuteswest; |
| 258 | vdso_data->tz_dsttime = sys_tz.tz_dsttime; | 256 | vdso_data->tz_dsttime = sys_tz.tz_dsttime; |
| 259 | smp_wmb(); | ||
| 260 | ++vdso_data->tb_seq_count; | ||
| 261 | } | 257 | } |
diff --git a/arch/arm64/kernel/vdso/gettimeofday.S b/arch/arm64/kernel/vdso/gettimeofday.S index 8bf658d974f9..f0a6d10b5211 100644 --- a/arch/arm64/kernel/vdso/gettimeofday.S +++ b/arch/arm64/kernel/vdso/gettimeofday.S | |||
| @@ -73,8 +73,6 @@ ENTRY(__kernel_gettimeofday) | |||
| 73 | /* If tz is NULL, return 0. */ | 73 | /* If tz is NULL, return 0. */ |
| 74 | cbz x1, 3f | 74 | cbz x1, 3f |
| 75 | ldp w4, w5, [vdso_data, #VDSO_TZ_MINWEST] | 75 | ldp w4, w5, [vdso_data, #VDSO_TZ_MINWEST] |
| 76 | seqcnt_read w9 | ||
| 77 | seqcnt_check w9, 1b | ||
| 78 | stp w4, w5, [x1, #TZ_MINWEST] | 76 | stp w4, w5, [x1, #TZ_MINWEST] |
| 79 | 3: | 77 | 3: |
| 80 | mov x0, xzr | 78 | mov x0, xzr |
