Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

futex: Fix compat_futex to be same as futex for REQUEUE_PI

Need to add the REQUEUE_PI checks to the compat_sys_futex API
as well to ensure 32 bit requeue's work fine on a 64 bit
system. Patch is against latest tip

Signed-off-by: Dinakar Guniguntala <dino@in.ibm.com>
Cc: Darren Hart <dvhltc@us.ibm.com>
LKML-Reference: <20090810130142.GA23619@in.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

authored by

Dinakar Guniguntala and committed by
Ingo Molnar
4dc88029 2fc39111

+4 -2
+4 -2
kernel/futex_compat.c
··· 180 180 int cmd = op & FUTEX_CMD_MASK; 181 181 182 182 if (utime && (cmd == FUTEX_WAIT || cmd == FUTEX_LOCK_PI || 183 - cmd == FUTEX_WAIT_BITSET)) { 183 + cmd == FUTEX_WAIT_BITSET || 184 + cmd == FUTEX_WAIT_REQUEUE_PI)) { 184 185 if (get_compat_timespec(&ts, utime)) 185 186 return -EFAULT; 186 187 if (!timespec_valid(&ts)) ··· 192 191 t = ktime_add_safe(ktime_get(), t); 193 192 tp = &t; 194 193 } 195 - if (cmd == FUTEX_REQUEUE || cmd == FUTEX_CMP_REQUEUE) 194 + if (cmd == FUTEX_REQUEUE || cmd == FUTEX_CMP_REQUEUE || 195 + cmd == FUTEX_CMP_REQUEUE_PI || cmd == FUTEX_WAKE_OP) 196 196 val2 = (int) (unsigned long) utime; 197 197 198 198 return do_futex(uaddr, op, val, tp, uaddr2, val2, val3);