]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: Fix race for sqes with userspace
authorPavel Begunkov <asml.silence@gmail.com>
Fri, 25 Oct 2019 09:31:31 +0000 (12:31 +0300)
committerJens Axboe <axboe@kernel.dk>
Fri, 25 Oct 2019 15:02:01 +0000 (09:02 -0600)
commit177dbd16fcdb23c9fdee99f1a80b1f236d1d8898
tree408e5c91fcd34aaa19d71fb4c672d89bf3e9c756
parent84b64e76bb4b0a4739691b3d6c47d561d23c2cc9
io_uring: Fix race for sqes with userspace

io_ring_submit() finalises with
1. io_commit_sqring(), which releases sqes to the userspace
2. Then calls to io_queue_link_head(), accessing released head's sqe

Reorder them.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c