aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Metcalf <cmetcalf@ezchip.com>2015-06-04 13:28:16 -0400
committerChris Metcalf <cmetcalf@ezchip.com>2015-06-04 13:31:27 -0400
commit9ae4d6bf228ec7f338e8220babb87ee4fae10429 (patch)
tree5ee1281043a6ec65db12fe56bd39780db8f2bd27
parent41dd496c8d9f622efff2c3b92ee308e13f58f639 (diff)
tile: vdso: use raw_read_seqcount_begin() in vdso
Previously we were using read_seqcount_begin(), which works fine until lockdep is enabled in the kernel, at which point lockdep locking shows up in the vdso and userspace will take a GPV accessing a kernel-only SPR when calling gettimeofday() etc. Signed-off-by: Chris Metcalf <cmetcalf@ezchip.com>
-rw-r--r--arch/tile/kernel/vdso/vgettimeofday.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/tile/kernel/vdso/vgettimeofday.c b/arch/tile/kernel/vdso/vgettimeofday.c
index 8bb21eda07d8..e63310c49742 100644
--- a/arch/tile/kernel/vdso/vgettimeofday.c
+++ b/arch/tile/kernel/vdso/vgettimeofday.c
@@ -67,7 +67,7 @@ static inline int do_realtime(struct vdso_data *vdso, struct timespec *ts)
67 u64 ns; 67 u64 ns;
68 68
69 do { 69 do {
70 count = read_seqcount_begin(&vdso->tb_seq); 70 count = raw_read_seqcount_begin(&vdso->tb_seq);
71 ts->tv_sec = vdso->wall_time_sec; 71 ts->tv_sec = vdso->wall_time_sec;
72 ns = vdso->wall_time_snsec; 72 ns = vdso->wall_time_snsec;
73 ns += vgetsns(vdso); 73 ns += vgetsns(vdso);
@@ -86,7 +86,7 @@ static inline int do_monotonic(struct vdso_data *vdso, struct timespec *ts)
86 u64 ns; 86 u64 ns;
87 87
88 do { 88 do {
89 count = read_seqcount_begin(&vdso->tb_seq); 89 count = raw_read_seqcount_begin(&vdso->tb_seq);
90 ts->tv_sec = vdso->monotonic_time_sec; 90 ts->tv_sec = vdso->monotonic_time_sec;
91 ns = vdso->monotonic_time_snsec; 91 ns = vdso->monotonic_time_snsec;
92 ns += vgetsns(vdso); 92 ns += vgetsns(vdso);
@@ -105,7 +105,7 @@ static inline int do_realtime_coarse(struct vdso_data *vdso,
105 unsigned count; 105 unsigned count;
106 106
107 do { 107 do {
108 count = read_seqcount_begin(&vdso->tb_seq); 108 count = raw_read_seqcount_begin(&vdso->tb_seq);
109 ts->tv_sec = vdso->wall_time_coarse_sec; 109 ts->tv_sec = vdso->wall_time_coarse_sec;
110 ts->tv_nsec = vdso->wall_time_coarse_nsec; 110 ts->tv_nsec = vdso->wall_time_coarse_nsec;
111 } while (unlikely(read_seqcount_retry(&vdso->tb_seq, count))); 111 } while (unlikely(read_seqcount_retry(&vdso->tb_seq, count)));
@@ -119,7 +119,7 @@ static inline int do_monotonic_coarse(struct vdso_data *vdso,
119 unsigned count; 119 unsigned count;
120 120
121 do { 121 do {
122 count = read_seqcount_begin(&vdso->tb_seq); 122 count = raw_read_seqcount_begin(&vdso->tb_seq);
123 ts->tv_sec = vdso->monotonic_time_coarse_sec; 123 ts->tv_sec = vdso->monotonic_time_coarse_sec;
124 ts->tv_nsec = vdso->monotonic_time_coarse_nsec; 124 ts->tv_nsec = vdso->monotonic_time_coarse_nsec;
125 } while (unlikely(read_seqcount_retry(&vdso->tb_seq, count))); 125 } while (unlikely(read_seqcount_retry(&vdso->tb_seq, count)));
@@ -137,7 +137,7 @@ struct syscall_return_value __vdso_gettimeofday(struct timeval *tv,
137 /* The use of the timezone is obsolete, normally tz is NULL. */ 137 /* The use of the timezone is obsolete, normally tz is NULL. */
138 if (unlikely(tz != NULL)) { 138 if (unlikely(tz != NULL)) {
139 do { 139 do {
140 count = read_seqcount_begin(&vdso->tz_seq); 140 count = raw_read_seqcount_begin(&vdso->tz_seq);
141 tz->tz_minuteswest = vdso->tz_minuteswest; 141 tz->tz_minuteswest = vdso->tz_minuteswest;
142 tz->tz_dsttime = vdso->tz_dsttime; 142 tz->tz_dsttime = vdso->tz_dsttime;
143 } while (unlikely(read_seqcount_retry(&vdso->tz_seq, count))); 143 } while (unlikely(read_seqcount_retry(&vdso->tz_seq, count)));