diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2020-06-08 21:08:17 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-06-08 13:47:37 -0600 |
commit | 3af73b286ccee493dc055fc58da02b2dc7a5304d (patch) | |
tree | 5876914efcdb3fbcc3fbdc6f642e9f39216b63b2 /scripts/gdb/linux/utils.py | |
parent | a8c73c1a614f6da6c0b04c393f87447e28cb6de4 (diff) |
io_uring: don't derive close state from ->func
Relying on having a specific work.func is dangerous, even if an opcode
handler set it itself. E.g. io_wq_assign_next() can modify it.
io_close() sets a custom work.func to indicate that
__close_fd_get_file() was already called. Fortunately, there is no bugs
with io_wq_assign_next() and close yet.
Still, do it safe and always be prepared to be called through
io_wq_submit_work(). Zero req->close.put_file in prep, and call
__close_fd_get_file() IFF it's NULL.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'scripts/gdb/linux/utils.py')
0 files changed, 0 insertions, 0 deletions