aboutsummaryrefslogtreecommitdiffstats
path: root/fs/timerfd.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/timerfd.c')
-rw-r--r--fs/timerfd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/timerfd.c b/fs/timerfd.c
index af9eca5c0230..61983f3b107c 100644
--- a/fs/timerfd.c
+++ b/fs/timerfd.c
@@ -95,7 +95,7 @@ static ssize_t timerfd_read(struct file *file, char __user *buf, size_t count,
95{ 95{
96 struct timerfd_ctx *ctx = file->private_data; 96 struct timerfd_ctx *ctx = file->private_data;
97 ssize_t res; 97 ssize_t res;
98 u32 ticks = 0; 98 u64 ticks = 0;
99 DECLARE_WAITQUEUE(wait, current); 99 DECLARE_WAITQUEUE(wait, current);
100 100
101 if (count < sizeof(ticks)) 101 if (count < sizeof(ticks))
@@ -130,7 +130,7 @@ static ssize_t timerfd_read(struct file *file, char __user *buf, size_t count,
130 * callback to avoid DoS attacks specifying a very 130 * callback to avoid DoS attacks specifying a very
131 * short timer period. 131 * short timer period.
132 */ 132 */
133 ticks = (u32) 133 ticks = (u64)
134 hrtimer_forward(&ctx->tmr, 134 hrtimer_forward(&ctx->tmr,
135 hrtimer_cb_get_time(&ctx->tmr), 135 hrtimer_cb_get_time(&ctx->tmr),
136 ctx->tintv); 136 ctx->tintv);
@@ -140,7 +140,7 @@ static ssize_t timerfd_read(struct file *file, char __user *buf, size_t count,
140 } 140 }
141 spin_unlock_irq(&ctx->wqh.lock); 141 spin_unlock_irq(&ctx->wqh.lock);
142 if (ticks) 142 if (ticks)
143 res = put_user(ticks, buf) ? -EFAULT: sizeof(ticks); 143 res = put_user(ticks, (u64 __user *) buf) ? -EFAULT: sizeof(ticks);
144 return res; 144 return res;
145} 145}
146 146