summaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/tasks.py
diff options
context:
space:
mode:
authorMateusz Guzik <mjguzik@gmail.com>2024-07-18 18:18:37 +0300
committerChristian Brauner <brauner@kernel.org>2024-07-24 11:52:58 +0300
commit5bc9ad78c2f836bd2fe9b5c911f8499364ee5b6e (patch)
tree9235d52e214601db74141451460fe8a915ffa0c3 /scripts/gdb/linux/tasks.py
parentfcad93360df4d04b172dba85b976c9f38ee0d5e0 (diff)
downloadlinux-5bc9ad78c2f836bd2fe9b5c911f8499364ee5b6e.tar.xz
vfs: handle __wait_on_freeing_inode() and evict() race
Lockless hash lookup can find and lock the inode after it gets the I_FREEING flag set, at which point it blocks waiting for teardown in evict() to finish. However, the flag is still set even after evict() wakes up all waiters. This results in a race where if the inode lock is taken late enough, it can happen after both hash removal and wakeups, meaning there is nobody to wake the racing thread up. This worked prior to RCU-based lookup because the entire ordeal was synchronized with the inode hash lock. Since unhashing requires the inode lock, we can safely check whether it happened after acquiring it. Link: https://lore.kernel.org/v9fs/20240717102458.649b60be@kernel.org/ Reported-by: Dominique Martinet <asmadeus@codewreck.org> Fixes: 7180f8d91fcb ("vfs: add rcu-based find_inode variants for iget ops") Signed-off-by: Mateusz Guzik <mjguzik@gmail.com> Link: https://lore.kernel.org/r/20240718151838.611807-1-mjguzik@gmail.com Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'scripts/gdb/linux/tasks.py')
0 files changed, 0 insertions, 0 deletions