提交 a8c7c250 编写于 作者: P Pavel Begunkov 提交者: Cheng Jian

io_uring: Fix getting file for timeout

mainline inclusion
from mainline-5.4-rc8
commit 5683e540
category: feature
bugzilla: https://bugzilla.openeuler.org/show_bug.cgi?id=27
CVE: NA
---------------------------

For timeout requests io_uring tries to grab a file with specified fd,
which is usually stdin/fd=0.
Update io_op_needs_file()
Signed-off-by: NPavel Begunkov <asml.silence@gmail.com>
Signed-off-by: NJens Axboe <axboe@kernel.dk>
Signed-off-by: NZhihao Cheng <chengzhihao1@huawei.com>
Signed-off-by: Nyangerkun <yangerkun@huawei.com>
Reviewed-by: Nzhangyi (F) <yi.zhang@huawei.com>
Signed-off-by: NCheng Jian <cj.chengjian@huawei.com>
上级 f4b7d5af
...@@ -2612,6 +2612,7 @@ static bool io_op_needs_file(const struct io_uring_sqe *sqe) ...@@ -2612,6 +2612,7 @@ static bool io_op_needs_file(const struct io_uring_sqe *sqe)
switch (op) { switch (op) {
case IORING_OP_NOP: case IORING_OP_NOP:
case IORING_OP_POLL_REMOVE: case IORING_OP_POLL_REMOVE:
case IORING_OP_TIMEOUT:
return false; return false;
default: default:
return true; return true;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册