lkml.org 
[lkml]   [2020]   [Feb]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subjectio_uring: io_grab_files() misses taking files->count?
Date
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

\
 
 \ /
  Last update: 2020-02-06 17:32    [W:0.032 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site