]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: used cached copies of sq->dropped and cq->overflow
authorJens Axboe <axboe@kernel.dk>
Fri, 25 Oct 2019 16:04:25 +0000 (10:04 -0600)
committerJens Axboe <axboe@kernel.dk>
Fri, 25 Oct 2019 16:58:45 +0000 (10:58 -0600)
commit41523485e36cf84b6995dad1e0fef05b892adcde
tree1504976635c808ef89e58d5b9be1deffff68166c
parent177dbd16fcdb23c9fdee99f1a80b1f236d1d8898
io_uring: used cached copies of sq->dropped and cq->overflow

We currently use the ring values directly, but that can lead to issues
if the application is malicious and changes these values on our behalf.
Created in-kernel cached versions of them, and just overwrite the user
side when we update them. This is similar to how we treat the sq/cq
ring tail/head updates.

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