]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: fix race condition reading SQ entries
authorStefan Bühler <source@stbuehler.de>
Fri, 19 Apr 2019 09:57:44 +0000 (11:57 +0200)
committerJens Axboe <axboe@kernel.dk>
Mon, 22 Apr 2019 17:00:55 +0000 (11:00 -0600)
commit095e60c01700d458b374fc1391dcd683b2636938
tree0ba64403279546f48c7a7839c935ddbc110fa7df
parent864a7076aa3f0f33c4a76526cfdb5a30c6f8e671
io_uring: fix race condition reading SQ entries

A read memory barrier is required between reading SQ tail and reading
the actual data belonging to the SQ entry.

Userspace needs a matching write barrier between writing SQ entries and
updating SQ tail (using smp_store_release to update tail will do).

Signed-off-by: Stefan Bühler <source@stbuehler.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c