* [PATCH -mm] Fix: timeout not passed anymore to futex_lock_pi
@ 2007-03-26 15:21 Pierre Peiffer
0 siblings, 0 replies; only message in thread
From: Pierre Peiffer @ 2007-03-26 15:21 UTC (permalink / raw)
To: akpm; +Cc: mingo, drepper, jean-pierre.dion, linux-kernel
This is a fix for a bug introduced by the patch
make-futex_wait-use-an-hrtimer-for-timeout.patch : the timeout value
is not passed anymore to futex_lock_pi.
Signed-off-by: Pierre Peiffer <pierre.peiffer@bull.net>
---
kernel/futex.c | 8 ++++++--
kernel/futex_compat.c | 4 +++-
2 files changed, 9 insertions(+), 3 deletions(-)
Index: b/kernel/futex.c
===================================================================
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -2383,8 +2383,10 @@ sys_futex64(u64 __user *uaddr, int op, u
return -EFAULT;
if (!timespec_valid(&ts))
return -EINVAL;
+
+ t = timespec_to_ktime(ts);
if (op == FUTEX_WAIT)
- t = ktime_add(ktime_get(), timespec_to_ktime(ts));
+ t = ktime_add(ktime_get(), t);
tp = &t;
}
/*
@@ -2413,8 +2415,10 @@ asmlinkage long sys_futex(u32 __user *ua
return -EFAULT;
if (!timespec_valid(&ts))
return -EINVAL;
+
+ t = timespec_to_ktime(ts);
if (op == FUTEX_WAIT)
- t = ktime_add(ktime_get(), timespec_to_ktime(ts));
+ t = ktime_add(ktime_get(), t);
tp = &t;
}
/*
Index: b/kernel/futex_compat.c
===================================================================
--- a/kernel/futex_compat.c
+++ b/kernel/futex_compat.c
@@ -150,8 +150,10 @@ asmlinkage long compat_sys_futex(u32 __u
return -EFAULT;
if (!timespec_valid(&ts))
return -EINVAL;
+
+ t = timespec_to_ktime(ts);
if (op == FUTEX_WAIT)
- t = ktime_add(ktime_get(), timespec_to_ktime(ts));
+ t = ktime_add(ktime_get(), t);
tp = &t;
}
if (op == FUTEX_REQUEUE || op == FUTEX_CMP_REQUEUE
--
Pierre Peiffer
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-03-26 15:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-26 15:21 [PATCH -mm] Fix: timeout not passed anymore to futex_lock_pi Pierre Peiffer
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.