aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/futex.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2008-02-13 03:20:43 -0500
committerThomas Gleixner <tglx@linutronix.de>2008-02-14 16:08:30 -0500
commit5a7780e725d1bb4c3094fcc12f1c5c5faea1e988 (patch)
tree50fc5cde427f3854d0b84ba1037fef3fb4693e11 /kernel/futex.c
parente760e716d47b48caf98da348368fd41b4a9b9e7e (diff)
hrtimer: check relative timeouts for overflow
Various user space callers ask for relative timeouts. While we fixed that overflow issue in hrtimer_start(), the sites which convert relative user space values to absolute timeouts themself were uncovered. Instead of putting overflow checks into each place add a function which does the sanity checking and convert all affected callers to use it. Thanks to Frans Pop, who reported the problem and tested the fixes. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Ingo Molnar <mingo@elte.hu> Tested-by: Frans Pop <elendil@planet.nl>
Diffstat (limited to 'kernel/futex.c')
-rw-r--r--kernel/futex.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/futex.c b/kernel/futex.c
index a6baaec44b8f..221f2128a437 100644
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -2116,7 +2116,7 @@ asmlinkage long sys_futex(u32 __user *uaddr, int op, u32 val,
2116 2116
2117 t = timespec_to_ktime(ts); 2117 t = timespec_to_ktime(ts);
2118 if (cmd == FUTEX_WAIT) 2118 if (cmd == FUTEX_WAIT)
2119 t = ktime_add(ktime_get(), t); 2119 t = ktime_add_safe(ktime_get(), t);
2120 tp = &t; 2120 tp = &t;
2121 } 2121 }
2122 /* 2122 /*