From 642566cc163f0b3696e888d0471190633708974f Mon Sep 17 00:00:00 2001 Message-Id: <642566cc163f0b3696e888d0471190633708974f.1302800144.git.dvhart@linux.intel.com> From: Darren Hart Date: Thu, 14 Apr 2011 09:29:04 -0700 Subject: [PATCH] futex: set FLAGS_HAS_TIMEOUT during demux for FUTEX_WAIT The FLAGS_HAS_TIMEOUT flag was not getting set, causing the restart_block to restart futex_wait() without a timeout after a signal. Signed-off-by: Darren Hart Reported-by: Tim Smith Reported-by: Torsten Hilbrich Cc: Thomas Gleixner Cc: Peter Zijlstra Cc: Ingo Molnar CC: Eric Dumazet CC: John Kacur --- kernel/futex.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/kernel/futex.c b/kernel/futex.c index dfb924f..5359259 100644 --- a/kernel/futex.c +++ b/kernel/futex.c @@ -2598,6 +2598,9 @@ long do_futex(u32 __user *uaddr, int op, u32 val, ktime_t *timeout, return -ENOSYS; } + if (timeout) + flags |= FLAGS_HAS_TIMEOUT; + switch (cmd) { case FUTEX_WAIT: val3 = FUTEX_BITSET_MATCH_ANY; -- 1.7.1