]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
futex: Do not apply time namespace adjustment on FUTEX_LOCK_PI
authorThomas Gleixner <tglx@linutronix.de>
Thu, 22 Apr 2021 19:44:19 +0000 (21:44 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 19 May 2021 08:32:25 +0000 (10:32 +0200)
commitdad233fc16d4b9644224e2e0d15aadde5208e1cb
tree06c6abf692f3a55db471708eb8dbfcbd5f6a41c9
parent063ea00f9903e88763b2912a30bc9d35edca5fd3
futex: Do not apply time namespace adjustment on FUTEX_LOCK_PI

BugLink: https://bugs.launchpad.net/bugs/1928857
commit cdf78db4070967869e4d027c11f4dd825d8f815a upstream.

FUTEX_LOCK_PI does not require to have the FUTEX_CLOCK_REALTIME bit set
because it has been using CLOCK_REALTIME based absolute timeouts
forever. Due to that, the time namespace adjustment which is applied when
FUTEX_CLOCK_REALTIME is not set, will wrongly take place for FUTEX_LOCK_PI
and wreckage the timeout.

Exclude it from that procedure.

Fixes: c2f7d08cccf4 ("futex: Adjust absolute futex timeouts with per time namespace offset")
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20210422194704.984540159@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
kernel/futex.c