Commits
Alexey Kuznetsov authored and Pavel Emelianov committed 0e7aa780173
[PATCH] pthead_mutex_lock deadlock inside VE This patch replaces diff-ve-futex-EDEADLK-bypass-20061225 and previous small patch reparing user-level deadlock in pthread_mutex_lock() happening because value 0 was not "virtual". It undoes unnatural tests for virtuality of pid supplied by user. Naively, this can result in kernel warning if user mangles pid doing something like: syscall(__NR_futex, &l, FUTEX_LOCK_PI, 0, 0); l = getpid() | 1024; syscall(__NR_futex, &l, FUTEX_LOCK_PI, 0, 0); This happens due to pid aliasing introduced with vpids: test pid == virt_pid(current) is not enough to ensure that pid does not correspond to current. I find more natural to test for this condition directly.