summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2019-12-04 18:53:43 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-12-13 10:42:33 +0300
commit74dcfcd1d3e332607a985344316ccf5d0c6ef0af (patch)
tree9427fd2e1f914cb340b8394d3d33f3d1178f511d /net
parent1dec7fcac3c52f98fe7e8a419c0fd5d7595a6fd7 (diff)
downloadlinux-74dcfcd1d3e332607a985344316ccf5d0c6ef0af.tar.xz
io_uring: ensure req->submit is copied when req is deferred
There's an issue with deferred requests through drain, where if we do need to defer, we're not copying over the sqe_submit state correctly. This can result in using uninitialized data when we then later go and submit the deferred request, like this check in __io_submit_sqe(): if (unlikely(s->index >= ctx->sq_entries)) return -EINVAL; with 's' being uninitialized, we can randomly fail this check. Fix this by copying sqe_submit state when we defer a request. Because it was fixed as part of a cleanup series in mainline, before anyone realized we had this issue. That removed the separate states of ->index vs ->submit.sqe. That series is not something I was comfortable putting into stable, hence the much simpler addition. Here's the patch in the series that fixes the same issue: commit cf6fd4bd559ee61a4454b161863c8de6f30f8dca Author: Pavel Begunkov <asml.silence@gmail.com> Date: Mon Nov 25 23:14:39 2019 +0300 io_uring: inline struct sqe_submit Reported-by: Andres Freund <andres@anarazel.de> Reported-by: Tomáš Chaloupka Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions