linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* io_uring: io_grab_files() misses taking files->count?
@ 2020-02-06 16:32 Kirill Tkhai
  2020-02-06 19:55 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Kirill Tkhai @ 2020-02-06 16:32 UTC (permalink / raw)
  To: Jens Axboe, LKML, io-uring

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-02-06 19:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-06 16:32 io_uring: io_grab_files() misses taking files->count? Kirill Tkhai
2020-02-06 19:55 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).