[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160620162652.2c4619c3@perruche.parrot.biz>
Date: Mon, 20 Jun 2016 16:26:52 +0200
From: Matthieu CASTET <matthieu.castet@...rot.com>
To: <linux-kernel@...r.kernel.org>,
Michael Kerrisk <mtk.manpages@...il.com>,
Darren Hart <dvhart@...ux.intel.com>
CC: Peter Zijlstra <peterz@...radead.org>,
Davidlohr Bueso <dave@...olabs.net>,
Thomas Gleixner <tglx@...utronix.de>
Subject: futex: Allow FUTEX_CLOCK_REALTIME with FUTEX_WAIT op
Hi,
the commit 337f13046ff03717a9e99675284a817527440a49 is saying that it
change to syscall to an equivalent to FUTEX_WAIT_BITSET |
FUTEX_CLOCK_REALTIME with a bitset of FUTEX_BITSET_MATCH_ANY.
It seems wrong to me, because in case of FUTEX_WAIT, in
"SYSCALL_DEFINE6(futex", we convert relative timeout to absolute
timeout [1].
So FUTEX_CLOCK_REALTIME | FUTEX_WAIT is expecting a relative timeout
when FUTEX_WAIT_BITSET take an absolute timeout.
To make it work you have to use something like the (untested) attached
patch.
Matthieu
[1]
if (cmd == FUTEX_WAIT)
t = ktime_add_safe(ktime_get(), t);
View attachment "diff" of type "text/x-patch" (395 bytes)
Powered by blists - more mailing lists