From: arnd@arndb.de
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
Andrew Morton <akpm@linux-foundation.org>,
David Miller <davem@davemloft.net>
Subject: [patch 3/3] futex_compat: update to match native version
Date: Mon, 10 Sep 2007 21:13:27 +0200 [thread overview]
Message-ID: <20070910191648.868241883@arndb.de> (raw)
In-Reply-To: 20070910191324.847651727@arndb.de
[-- Attachment #1: futex_compat_clean.diff --]
[-- Type: text/plain, Size: 1752 bytes --]
A few changes have gone into the futex code but not into
the futex_compat code, the most significant one being a
fix for FUTEX_WAKE_OP in commit
f54f098612d7f86463b5fb4763d03533d634de73.
This brings both versions in sync again.
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: David Miller <davem@davemloft.net>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Index: linux-2.6/kernel/futex_compat.c
===================================================================
--- linux-2.6.orig/kernel/futex_compat.c
+++ linux-2.6/kernel/futex_compat.c
@@ -62,8 +62,10 @@ void compat_exit_robust_list(struct task
*/
if (fetch_robust_entry(&pending, &head->list_op_pending, &pip))
return;
+
if (pending)
- handle_futex_death((void __user *)pending + futex_offset, curr, pip);
+ handle_futex_death((void __user *)pending + futex_offset,
+ curr, pip);
while (entry != &head->list) {
/*
@@ -142,7 +144,7 @@ asmlinkage long compat_sys_futex(u32 __u
{
struct timespec ts;
ktime_t t, *tp = NULL;
- int val2 = 0;
+ u32 val2 = 0;
int cmd = op & FUTEX_CMD_MASK;
if (utime && (cmd == FUTEX_WAIT || cmd == FUTEX_LOCK_PI)) {
@@ -156,8 +158,13 @@ asmlinkage long compat_sys_futex(u32 __u
t = ktime_add(ktime_get(), t);
tp = &t;
}
- if (cmd == FUTEX_REQUEUE || cmd == FUTEX_CMP_REQUEUE)
- val2 = (int) (unsigned long) utime;
+ /*
+ * requeue parameter in 'utime' if cmd == FUTEX_REQUEUE.
+ * number of waiters to wake in 'utime' if cmd == FUTEX_WAKE_OP.
+ */
+ if (cmd == FUTEX_REQUEUE || cmd == FUTEX_CMP_REQUEUE ||
+ cmd == FUTEX_WAKE_OP)
+ val2 = (u32) (unsigned long) utime;
return do_futex(uaddr, op, val, tp, uaddr2, val2, val3);
}
--
next prev parent reply other threads:[~2007-09-10 19:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-10 19:13 [patch 0/3] futex_compat fixes arnd
2007-09-10 19:13 ` [patch 1/3] futex_compat: fix list traversal bugs arnd
2007-09-10 19:34 ` Ingo Molnar
2007-09-10 19:13 ` [patch 2/3] futex_compat: simplify pointer magic arnd
2007-09-10 19:35 ` Ingo Molnar
2007-09-10 19:13 ` arnd [this message]
2007-09-10 19:35 ` [patch 3/3] futex_compat: update to match native version Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070910191648.868241883@arndb.de \
--to=arnd@arndb.de \
--cc=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox