Messages in this thread | | | From | Kirill Tkhai <> | Subject | io_uring: io_grab_files() misses taking files->count? | Date | Thu, 6 Feb 2020 19:32:20 +0300 |
| |
Hi, Jens,
in io_grab_files() we take pointer to current->files without taking files->count. Later, this files become attached to worker in io_worker_handle_work() also without any manipulation with counter.
But files->count is used for different optimizations. Say, in expand_fdtable() we avoid synchonize_rcu() in case of there is only files user. In case of there are more users, missing of synchronize_rcu() is not safe.
Is this correct? Or maybe there is some hidden logic in io_uring, which prevents this problem? Say, IORING_OP_OPENAT/CLOSE/ETC can't be propagated to worker etc...
Kirill
| |