]> git.baikalelectronics.ru Git - kernel.git/commit
futex: Fix inode life-time issue
authorPeter Zijlstra <peterz@infradead.org>
Wed, 4 Mar 2020 10:28:31 +0000 (11:28 +0100)
committerPeter Zijlstra <peterz@infradead.org>
Fri, 6 Mar 2020 10:06:15 +0000 (11:06 +0100)
commitfb796c0eb40b2742659d450618538a824eecd789
tree889b754b07fa844410d6782bc1b4473007a9bc99
parent5ffd64ecc0987e6f01533e7cc8fa89b7b34f793f
futex: Fix inode life-time issue

As reported by Jann, ihold() does not in fact guarantee inode
persistence. And instead of making it so, replace the usage of inode
pointers with a per boot, machine wide, unique inode identifier.

This sequence number is global, but shared (file backed) futexes are
rare enough that this should not become a performance issue.

Reported-by: Jann Horn <jannh@google.com>
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
fs/inode.c
include/linux/fs.h
include/linux/futex.h
kernel/futex.c